From 0938bddf0f888b89ac32161403775d3d4a21f80b Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 19 Sep 2019 15:51:10 +0530 Subject: [PATCH 1/3] firefox restriction removed --- src/app/tabs/compileTab/compilerContainer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js index 791adb0a0d..f1ac414b77 100644 --- a/src/app/tabs/compileTab/compilerContainer.js +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -319,8 +319,8 @@ class CompilerContainer { } url = `${this.data.baseurl}/${this.data.selectedVersion}` } - const isFirefox = typeof InstallTrigger !== 'undefined' - if (document.location.protocol !== 'file:' && Worker !== undefined && isFirefox) { + // Check if browser is compatible with web worker + if (document.location.protocol !== 'file:' && Worker !== undefined) { // Workers cannot load js on "file:"-URLs and we get a // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // resort to non-worker version in that case. From 6e60e47aa50942fc3dfb6020daccfe52705a689a Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 19 Sep 2019 14:43:27 +0200 Subject: [PATCH 2/3] wait for compilation to finish --- test-browser/commands/verifyContracts.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test-browser/commands/verifyContracts.js b/test-browser/commands/verifyContracts.js index c35870180f..42bf669e4c 100644 --- a/test-browser/commands/verifyContracts.js +++ b/test-browser/commands/verifyContracts.js @@ -13,7 +13,10 @@ class VerifyContracts extends EventEmitter { } function getCompiledContracts (browser, callback) { - browser.clickLaunchIcon('solidity').execute(function () { + browser + .clickLaunchIcon('solidity') + .waitForElementPresent('#compileTabView select#compiledContracts option') + .execute(function () { var contracts = document.querySelectorAll('#compileTabView select#compiledContracts option') if (!contracts) { return null From 742655f0624b723b01b66274b43c924ebd809637 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 20 Sep 2019 13:42:25 +0530 Subject: [PATCH 3/3] separate function added --- src/app/tabs/compileTab/compilerContainer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js index f1ac414b77..948cd8a825 100644 --- a/src/app/tabs/compileTab/compilerContainer.js +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -320,7 +320,7 @@ class CompilerContainer { url = `${this.data.baseurl}/${this.data.selectedVersion}` } // Check if browser is compatible with web worker - if (document.location.protocol !== 'file:' && Worker !== undefined) { + if (this.browserSupportWorker) { // Workers cannot load js on "file:"-URLs and we get a // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // resort to non-worker version in that case. @@ -374,6 +374,10 @@ class CompilerContainer { this.data.compileTimeout = window.setTimeout(() => this.compileIfAutoCompileOn(), this.data.timeout) } + browserSupportWorker () { + return document.location.protocol !== 'file:' && Worker !== undefined + } + } module.exports = CompilerContainer