Loading browser/extensions/formautofill/test/mochitest/formautofill_parent_utils.js +1 −3 Original line number Diff line number Diff line // assert is available to chrome scripts loaded via SpecialPowers.loadChromeScript. /* global assert */ /* eslint-env mozilla/frame-script */ /* eslint-env mozilla/chrome-script */ "use strict"; Loading browser/extensions/formautofill/test/mochitest/test_address_level_1_submission.html +1 −1 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ add_task(async function test_DE_is_valid_testcase() { ], }); let chromeScript = SpecialPowers.loadChromeScript(function test_country_data() { /* eslint-env mozilla/chrome-script */ const {AddressDataLoader} = ChromeUtils.import("resource://autofill/FormAutofillUtils.jsm"); let data = AddressDataLoader.getData("DE"); /* global addMessageListener */ addMessageListener("CheckSubKeys", () => { return !data.defaultLocale.sub_keys; }); Loading docshell/test/mochitest/test_bug509055.html +1 −2 Original line number Diff line number Diff line Loading @@ -81,12 +81,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=509055 sheTitle = sh.legacySHistory.getEntryAtIndex(sh.index).title; } else { let chromeScript = SpecialPowers.loadChromeScript(() => { // eslint-disable-next-line no-undef /* eslint-env mozilla/chrome-script */ addMessageListener("getTitle", browsingContext => { // eslint-disable-next-line no-shadow let sh = browsingContext.sessionHistory; let title = sh.getEntryAtIndex(sh.index).title; // eslint-disable-next-line no-undef sendAsyncMessage("title", title); }); }); Loading docshell/test/navigation/test_bug1300461.html +1 −3 Original line number Diff line number Diff line Loading @@ -20,17 +20,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id= let chromeScript = null; if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { chromeScript = SpecialPowers.loadChromeScript(() => { /* eslint-env mozilla/chrome-script */ function doSend(message, fn) { try { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: true, value: fn()}); } catch(_) { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: false}); } } // eslint-disable-next-line no-undef addMessageListener("requestedIndex", (id) => { doSend("requestedIndex", () => { let shistory = BrowsingContext.get(id).top.sessionHistory; Loading docshell/test/navigation/test_bug1375833.html +1 −3 Original line number Diff line number Diff line Loading @@ -26,17 +26,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375833 let chromeScript = null; if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { chromeScript = SpecialPowers.loadChromeScript(() => { /* eslint-env mozilla/chrome-script */ function doSend(message, fn) { try { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: true, value: fn()}); } catch(_) { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: false}); } } // eslint-disable-next-line no-undef addMessageListener("test1", id => { doSend("test1", () => { let sessionHistory = BrowsingContext.get(id).top.sessionHistory; Loading Loading
browser/extensions/formautofill/test/mochitest/formautofill_parent_utils.js +1 −3 Original line number Diff line number Diff line // assert is available to chrome scripts loaded via SpecialPowers.loadChromeScript. /* global assert */ /* eslint-env mozilla/frame-script */ /* eslint-env mozilla/chrome-script */ "use strict"; Loading
browser/extensions/formautofill/test/mochitest/test_address_level_1_submission.html +1 −1 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ add_task(async function test_DE_is_valid_testcase() { ], }); let chromeScript = SpecialPowers.loadChromeScript(function test_country_data() { /* eslint-env mozilla/chrome-script */ const {AddressDataLoader} = ChromeUtils.import("resource://autofill/FormAutofillUtils.jsm"); let data = AddressDataLoader.getData("DE"); /* global addMessageListener */ addMessageListener("CheckSubKeys", () => { return !data.defaultLocale.sub_keys; }); Loading
docshell/test/mochitest/test_bug509055.html +1 −2 Original line number Diff line number Diff line Loading @@ -81,12 +81,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=509055 sheTitle = sh.legacySHistory.getEntryAtIndex(sh.index).title; } else { let chromeScript = SpecialPowers.loadChromeScript(() => { // eslint-disable-next-line no-undef /* eslint-env mozilla/chrome-script */ addMessageListener("getTitle", browsingContext => { // eslint-disable-next-line no-shadow let sh = browsingContext.sessionHistory; let title = sh.getEntryAtIndex(sh.index).title; // eslint-disable-next-line no-undef sendAsyncMessage("title", title); }); }); Loading
docshell/test/navigation/test_bug1300461.html +1 −3 Original line number Diff line number Diff line Loading @@ -20,17 +20,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id= let chromeScript = null; if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { chromeScript = SpecialPowers.loadChromeScript(() => { /* eslint-env mozilla/chrome-script */ function doSend(message, fn) { try { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: true, value: fn()}); } catch(_) { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: false}); } } // eslint-disable-next-line no-undef addMessageListener("requestedIndex", (id) => { doSend("requestedIndex", () => { let shistory = BrowsingContext.get(id).top.sessionHistory; Loading
docshell/test/navigation/test_bug1375833.html +1 −3 Original line number Diff line number Diff line Loading @@ -26,17 +26,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375833 let chromeScript = null; if (SpecialPowers.Services.appinfo.sessionHistoryInParent) { chromeScript = SpecialPowers.loadChromeScript(() => { /* eslint-env mozilla/chrome-script */ function doSend(message, fn) { try { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: true, value: fn()}); } catch(_) { // eslint-disable-next-line no-undef sendAsyncMessage(message, {success: false}); } } // eslint-disable-next-line no-undef addMessageListener("test1", id => { doSend("test1", () => { let sessionHistory = BrowsingContext.get(id).top.sessionHistory; Loading