diff options
Diffstat (limited to 'js/test/Common/TestRunner.js')
-rw-r--r-- | js/test/Common/TestRunner.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/test/Common/TestRunner.js b/js/test/Common/TestRunner.js index d8c7e399c96..e006c755172 100644 --- a/js/test/Common/TestRunner.js +++ b/js/test/Common/TestRunner.js @@ -19,11 +19,25 @@ function isSafari() return /^((?!chrome).)*safari/i.test(navigator.userAgent); } +function isChrome() +{ + // + // We need to check for Edge browser as it might include Chrome in its user agent. + // + return navigator.userAgent.indexOf("Edge/") === -1 && + navigator.userAgent.indexOf("Chrome/") !== -1; +} + function isWorker() { return typeof(WorkerGlobalScope) !== 'undefined' && this instanceof WorkerGlobalScope; } +function isWindows() +{ + return navigator.userAgent.indexOf("Windows") != -1; +} + function runTest(name, language, defaultHost, protocol, configurations, out) { var server, communicator; |