From f6bb09465569dd0b5e8fb5624fe0ec4437efd7ce Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 28 Jun 2017 14:02:00 +0100 Subject: [PATCH 1/3] Align to @dojo/shim/global --- src/loader.ts | 16 +++++++++------- tests/intern.ts | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/loader.ts b/src/loader.ts index 707d900..883f85d 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -7,16 +7,18 @@ declare const Packages: {} | undefined; (function (args?: string[]): void { let globalObject: any = (function (): any { - if (typeof window !== 'undefined') { - // Browsers - return window; - } - else if (typeof global !== 'undefined') { - // Node + if (typeof global !== 'undefined') { + // global spec defines a reference to the global object called 'global' + // https://github.com/tc39/proposal-global + // `global` is also defined in NodeJS return global; } + else if (typeof window !== 'undefined') { + // window is defined in browsers + return window; + } else if (typeof self !== 'undefined') { - // Web workers + // self is defined in WebWorkers return self; } return {}; diff --git a/tests/intern.ts b/tests/intern.ts index 9c4f93b..93e284a 100644 --- a/tests/intern.ts +++ b/tests/intern.ts @@ -22,10 +22,10 @@ export const environments = [ { browserName: 'internet explorer', version: '11', platform: 'WINDOWS' }, { browserName: 'edge', platform: 'WINDOWS' }, { browserName: 'firefox', platform: 'WINDOWS' }, - { browserName: 'chrome', platform: 'WINDOWS' } /* , - { browserName: 'safari', version: '10', platform: 'MAC' }, + { browserName: 'chrome', platform: 'WINDOWS' }, + { browserName: 'safari', version: '10', platform: 'MAC' } /* , { browserName: 'iPad', version: '9.1' } */ - /* issues with Safari and iOS on BrowserStack with loader */ + /* issues with iOS 9.1 and BrowserStack */ ]; // Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service From 4f9d6c4fb481e96a2999638de8377c00a792de85 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 28 Jun 2017 14:24:17 +0100 Subject: [PATCH 2/3] Pin Firefox version --- tests/intern.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/intern.ts b/tests/intern.ts index 93e284a..63ab2ba 100644 --- a/tests/intern.ts +++ b/tests/intern.ts @@ -21,7 +21,7 @@ export const capabilities = { export const environments = [ { browserName: 'internet explorer', version: '11', platform: 'WINDOWS' }, { browserName: 'edge', platform: 'WINDOWS' }, - { browserName: 'firefox', platform: 'WINDOWS' }, + { browserName: 'firefox', version: '52', platform: 'WINDOWS' }, { browserName: 'chrome', platform: 'WINDOWS' }, { browserName: 'safari', version: '10', platform: 'MAC' } /* , { browserName: 'iPad', version: '9.1' } */ From c3be4c1a5de8d20d6e8934bda80aa5bce108ed8d Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 28 Jun 2017 14:36:14 +0100 Subject: [PATCH 3/3] Revert loader alignment, does not fix issue --- src/loader.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/loader.ts b/src/loader.ts index 883f85d..707d900 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -7,18 +7,16 @@ declare const Packages: {} | undefined; (function (args?: string[]): void { let globalObject: any = (function (): any { - if (typeof global !== 'undefined') { - // global spec defines a reference to the global object called 'global' - // https://github.com/tc39/proposal-global - // `global` is also defined in NodeJS - return global; - } - else if (typeof window !== 'undefined') { - // window is defined in browsers + if (typeof window !== 'undefined') { + // Browsers return window; } + else if (typeof global !== 'undefined') { + // Node + return global; + } else if (typeof self !== 'undefined') { - // self is defined in WebWorkers + // Web workers return self; } return {};