Bug 1596217 - Make toolkit/components/remotebrowserutils/tests/ Fission-compatible, r=kmag
authorKashav Madan <kmadan@mozilla.com>
Thu, 14 Nov 2019 19:59:37 +0000
changeset 502114 2007edb47f8ffdda9ef310c833e131ac7efc230f
parent 502113 ff4ff0dd4da373d91ebf6b5f9a13782a69de7847
child 502115 591e273e2d9e111a9901b2639a593033130d7a10
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1596217
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596217 - Make toolkit/components/remotebrowserutils/tests/ Fission-compatible, r=kmag This updates browser_RemoteWebNavigation.js to only do same-origin navigations, and updates browser_httpResponseProcessSelection.js to skip test_disabled if Fission is enabled. Differential Revision: https://phabricator.services.mozilla.com/D52925
toolkit/components/remotebrowserutils/tests/browser/browser.ini
toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
toolkit/components/remotebrowserutils/tests/browser/browser_httpResponseProcessSelection.js
--- a/toolkit/components/remotebrowserutils/tests/browser/browser.ini
+++ b/toolkit/components/remotebrowserutils/tests/browser/browser.ini
@@ -4,14 +4,13 @@ support-files =
   dummy_page.html
   print_postdata.sjs
   307redirect.sjs
   head.js
   coop_header.sjs
   file_postmsg_parent.html
 
 [browser_RemoteWebNavigation.js]
-skip-if = fission
 [browser_httpResponseProcessSelection.js]
-skip-if = fission # BrowserTestUtils.browserLoaded call that spans a process switch
+skip-if = fission # JavaScript error: resource://gre/modules/ExtensionCommon.jsm, line 415: SecurityError: Permission denied to access property "removeEventListener" on cross-origin object
 [browser_httpCrossOriginOpenerPolicy.js]
 [browser_httpToFileHistory.js]
 [browser_oopProcessSwap.js]
--- a/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
@@ -1,13 +1,13 @@
 const SYSTEMPRINCIPAL = Services.scriptSecurityManager.getSystemPrincipal();
 const DUMMY1 =
-  "http://example.com/browser/toolkit/modules/tests/browser/dummy_page.html";
+  "http://test1.example.org/browser/toolkit/modules/tests/browser/dummy_page.html";
 const DUMMY2 =
-  "http://example.org/browser/toolkit/modules/tests/browser/dummy_page.html";
+  "http://test2.example.org/browser/toolkit/modules/tests/browser/dummy_page.html";
 const LOAD_URI_OPTIONS = { triggeringPrincipal: SYSTEMPRINCIPAL };
 
 function waitForLoad(uri) {
   return BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
 }
 
 function waitForPageShow(browser = gBrowser.selectedBrowser) {
   return BrowserTestUtils.waitForContentEvent(browser, "pageshow", true);
--- a/toolkit/components/remotebrowserutils/tests/browser/browser_httpResponseProcessSelection.js
+++ b/toolkit/components/remotebrowserutils/tests/browser/browser_httpResponseProcessSelection.js
@@ -233,16 +233,23 @@ async function testLoadAndRedirect(
       info(`thirdProcessID: ${thirdProcessID}`);
       Assert.equal(firstProcessID != thirdProcessID, expectedProcessSwitch);
       Assert.ok(secondProcessID == thirdProcessID);
     }
   );
 }
 
 add_task(async function test_disabled() {
+  if (gFissionBrowser) {
+    info(
+      `Skipping test. Cannot disable ${RESPONSE_PROCESS_SELECTION_PREF} with Fission.`
+    );
+    return;
+  }
+
   await unsetPref();
 
   // With the pref disabled, file URIs should successfully POST, but remain in
   // the 'file' process.
   info("DISABLED -- FILE -- raw URI load");
   let resp = await postFrom(FILE_DUMMY, PRINT_POSTDATA);
   is(resp.remoteType, E10SUtils.FILE_REMOTE_TYPE, "no process switch");
   is(resp.location, PRINT_POSTDATA, "correct location");