Bug 1472212 - Remove unnecessary async/await keywords for browser_new_tab_in_privileged_process_pref.js. r=Gijs
☠☠ backed out by dff3cfb50f19 ☠ ☠
authorJay Lim <jlim@mozilla.com>
Fri, 20 Jul 2018 16:46:09 -0400
changeset 443639 1978a7837502d65b12ce3ae35a16a340ab353c9e
parent 443638 21a6f1a83c73ce4fff654d4b2118e98375f0a528
child 443640 18f824674b76d87ed8cdaee516ad450c1c9b6496
push id34964
push useraciure@mozilla.com
push dateWed, 31 Oct 2018 05:08:54 +0000
treeherdermozilla-central@1c5ee1a29757 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1472212
milestone65.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 1472212 - Remove unnecessary async/await keywords for browser_new_tab_in_privileged_process_pref.js. r=Gijs MozReview-Commit-ID: HVC9vEcslja
browser/base/content/test/tabs/browser_new_tab_in_privileged_process_pref.js
--- a/browser/base/content/test/tabs/browser_new_tab_in_privileged_process_pref.js
+++ b/browser/base/content/test/tabs/browser_new_tab_in_privileged_process_pref.js
@@ -25,17 +25,17 @@ const TEST_HTTP = "http://example.org/";
  * @param {string} expectedRemoteType
  *        The expected remoteType value for the browser in both the parent
  *        and child processes.
  * @param {optional string} message
  *        If provided, shows this string as the message when remoteType values
  *        do not match. If not present, it uses the default message defined
  *        in the function parameters.
  */
-async function checkBrowserRemoteType(
+function checkBrowserRemoteType(
   browser,
   expectedRemoteType,
   message = `Ensures that tab runs in the ${expectedRemoteType} content process.`
 ) {
   // Check both parent and child to ensure that they have the correct remoteType.
   is(browser.remoteType, expectedRemoteType, message);
   is(browser.messageManager.remoteType, expectedRemoteType,
     "Parent and child process should agree on the remote type.");
@@ -58,17 +58,17 @@ add_task(async function setup() {
  * the privileged content process. With the reference, we can then open Activity
  * Stream links in a new tab and ensure that the new tab opens in the same
  * privileged content process as our reference.
  */
 add_task(async function activity_stream_in_privileged_content_process() {
   Services.ppmm.releaseCachedProcesses();
 
   await BrowserTestUtils.withNewTab(ABOUT_NEWTAB, async function(browser1) {
-    await checkBrowserRemoteType(browser1, E10SUtils.PRIVILEGED_REMOTE_TYPE);
+    checkBrowserRemoteType(browser1, E10SUtils.PRIVILEGED_REMOTE_TYPE);
 
     // Note the processID for about:newtab for comparison later.
     let privilegedPid = browser1.frameLoader.tabParent.osPid;
 
     for (let url of [
       ABOUT_NEWTAB,
       ABOUT_WELCOME,
       ABOUT_HOME,
@@ -92,17 +92,17 @@ add_task(async function activity_stream_
 /*
  * Test to ensure that a process switch occurs when navigating between normal
  * web pages and Activity Stream pages in the same tab.
  */
 add_task(async function process_switching_through_loading_in_the_same_tab() {
   Services.ppmm.releaseCachedProcesses();
 
   await BrowserTestUtils.withNewTab(TEST_HTTP, async function(browser) {
-    await checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
 
     for (let [url, remoteType] of [
       [ABOUT_NEWTAB, E10SUtils.PRIVILEGED_REMOTE_TYPE],
       [ABOUT_BLANK, E10SUtils.PRIVILEGED_REMOTE_TYPE],
       [TEST_HTTP, E10SUtils.WEB_REMOTE_TYPE],
       [ABOUT_HOME, E10SUtils.PRIVILEGED_REMOTE_TYPE],
       [TEST_HTTP, E10SUtils.WEB_REMOTE_TYPE],
       [ABOUT_WELCOME, E10SUtils.PRIVILEGED_REMOTE_TYPE],
@@ -118,33 +118,33 @@ add_task(async function process_switchin
       [TEST_HTTP, E10SUtils.WEB_REMOTE_TYPE],
       [`${ABOUT_WELCOME}?q=bar`, E10SUtils.PRIVILEGED_REMOTE_TYPE],
       [TEST_HTTP, E10SUtils.WEB_REMOTE_TYPE],
       [`${ABOUT_HOME}?q=baz`, E10SUtils.PRIVILEGED_REMOTE_TYPE],
       [TEST_HTTP, E10SUtils.WEB_REMOTE_TYPE],
     ]) {
       BrowserTestUtils.loadURI(browser, url);
       await BrowserTestUtils.browserLoaded(browser, false, url);
-      await checkBrowserRemoteType(browser, remoteType);
+      checkBrowserRemoteType(browser, remoteType);
     }
   });
 
   Services.ppmm.releaseCachedProcesses();
 });
 
 /*
  * Test to ensure that a process switch occurs when navigating between normal
  * web pages and Activity Stream pages using the browser's navigation features
  * such as history and location change.
  */
 add_task(async function process_switching_through_navigation_features() {
   Services.ppmm.releaseCachedProcesses();
 
   await BrowserTestUtils.withNewTab(ABOUT_NEWTAB, async function(browser) {
-    await checkBrowserRemoteType(browser, E10SUtils.PRIVILEGED_REMOTE_TYPE);
+    checkBrowserRemoteType(browser, E10SUtils.PRIVILEGED_REMOTE_TYPE);
 
     // Note the processID for about:newtab for comparison later.
     let privilegedPid = browser.frameLoader.tabParent.osPid;
 
     // Check that about:newtab opened from JS in about:newtab page is in the same process.
     let promiseTabOpened = BrowserTestUtils.waitForNewTab(gBrowser, ABOUT_NEWTAB, true);
     await ContentTask.spawn(browser, ABOUT_NEWTAB, uri => {
       content.open(uri, "_blank");
@@ -161,17 +161,17 @@ add_task(async function process_switchin
     BrowserReload();
     await BrowserTestUtils.browserLoaded(browser, false, ABOUT_NEWTAB);
     is(browser.frameLoader.tabParent.osPid, privilegedPid,
       "Check that about:newtab is still in privileged content process after reload.");
 
     // Load http webpage
     BrowserTestUtils.loadURI(browser, TEST_HTTP);
     await BrowserTestUtils.browserLoaded(browser, false, TEST_HTTP);
-    await checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
 
     // Check that using the history back feature switches back to privileged content process.
     let promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, ABOUT_NEWTAB);
     browser.goBack();
     await promiseLocation;
     // We will need to ensure that the process flip has fully completed so that
     // the navigation history data will be available when we do browser.goForward();
     await BrowserTestUtils.waitForEvent(newTab, "SSTabRestored");
@@ -180,29 +180,29 @@ add_task(async function process_switchin
 
     // Check that using the history forward feature switches back to the web content process.
     promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, TEST_HTTP);
     browser.goForward();
     await promiseLocation;
     // We will need to ensure that the process flip has fully completed so that
     // the navigation history data will be available when we do browser.gotoIndex(0);
     await BrowserTestUtils.waitForEvent(newTab, "SSTabRestored");
-    await checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE,
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE,
       "Check that tab runs in the web content process after using history goForward.");
 
     // Check that goto history index does not break the affinity.
     promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, ABOUT_NEWTAB);
     browser.gotoIndex(0);
     await promiseLocation;
     is(browser.frameLoader.tabParent.osPid, privilegedPid,
       "Check that about:newtab is in privileged content process after history gotoIndex.");
 
     BrowserTestUtils.loadURI(browser, TEST_HTTP);
     await BrowserTestUtils.browserLoaded(browser, false, TEST_HTTP);
-    await checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
 
     // Check that location change causes a change in process type as well.
     await ContentTask.spawn(browser, ABOUT_NEWTAB, uri => {
       content.location = uri;
     });
     await BrowserTestUtils.browserLoaded(browser, false, ABOUT_NEWTAB);
     is(browser.frameLoader.tabParent.osPid, privilegedPid,
       "Check that about:newtab is in privileged content process after location change.");