Bug 1630171 - Fix intermittent due to AboutWelcome actor not available r=mconley
authorPunam Dahiya <punamdahiya@yahoo.com>
Thu, 16 Apr 2020 16:07:28 +0000
changeset 524422 5c40440a097ecb54c1d5724c8e775aafa2c8197b
parent 524421 f28b42617940d1660c69e949c4a8086de9476ecf
child 524423 f2c995169b5c3337d3d73a664fce95eb0fe6b829
push id37321
push userdluca@mozilla.com
push dateFri, 17 Apr 2020 09:38:52 +0000
treeherdermozilla-central@24537fed53e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1630171
milestone77.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 1630171 - Fix intermittent due to AboutWelcome actor not available r=mconley Differential Revision: https://phabricator.services.mozilla.com/D71105
browser/components/newtab/test/browser/browser_aboutwelcome_observer.js
--- a/browser/components/newtab/test/browser/browser_aboutwelcome_observer.js
+++ b/browser/components/newtab/test/browser/browser_aboutwelcome_observer.js
@@ -11,18 +11,17 @@ const { AboutWelcomeParent } = ChromeUti
 async function setAboutWelcomePref(value) {
   return pushPrefs([SEPARATE_ABOUT_WELCOME_PREF, value]);
 }
 
 async function openAboutWelcomeTab() {
   await setAboutWelcomePref(true);
   let tab = await BrowserTestUtils.openNewForegroundTab(
     gBrowser,
-    "about:welcome",
-    false
+    "about:welcome"
   );
   registerCleanupFunction(() => {
     BrowserTestUtils.removeTab(tab);
   });
   return tab;
 }
 
 /**
@@ -49,20 +48,20 @@ add_task(async function test_About_Welco
   );
 });
 
 /**
  * Test simplified welcome UI closed due to change in location uri
  */
 add_task(async function test_About_Welcome_Location_Change() {
   await openAboutWelcomeTab();
-  let currentWindow =
+  let windowGlobalParent =
     gBrowser.selectedBrowser.browsingContext.currentWindowGlobal;
 
-  let aboutWelcomeActor = await currentWindow.getActor("AboutWelcome");
+  let aboutWelcomeActor = await windowGlobalParent.getActor("AboutWelcome");
 
   Assert.ok(
     aboutWelcomeActor.AboutWelcomeObserver,
     "AboutWelcomeObserver is not null"
   );
   await BrowserTestUtils.loadURI(
     gBrowser.selectedBrowser,
     "http://example.com/#foo"