Bug 1492482 - Remove CPOW usage from browser_onboarding_skip_tour.js. r=ursula
authorMike Conley <mconley@mozilla.com>
Tue, 02 Oct 2018 17:59:32 +0000
changeset 439233 6cbfcebf531fbe916bb6848ecf820b4e4ef7259f
parent 439232 b34f1ec1569773c95b464bc7bd2a7669928eefba
child 439234 0c2a8c43e38efe614fd7f70e6f5c364bb63e93c4
push id34758
push userdvarga@mozilla.com
push dateTue, 02 Oct 2018 21:45:21 +0000
treeherdermozilla-central@4392b5198fb7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersursula
bugs1492482
milestone64.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 1492482 - Remove CPOW usage from browser_onboarding_skip_tour.js. r=ursula Depends on D6958 Differential Revision: https://phabricator.services.mozilla.com/D6959
browser/extensions/onboarding/test/browser/browser_onboarding_skip_tour.js
--- a/browser/extensions/onboarding/test/browser/browser_onboarding_skip_tour.js
+++ b/browser/extensions/onboarding/test/browser/browser_onboarding_skip_tour.js
@@ -27,16 +27,21 @@ add_task(async function test_skip_onboar
   BrowserTestUtils.removeTab(tab);
 });
 
 add_task(async function test_hide_skip_button_via_perf() {
   resetOnboardingDefaultState();
   Preferences.set("browser.onboarding.skip-tour-button.hide", true);
 
   let tab = await openTab(ABOUT_NEWTAB_URL);
-  await promiseOnboardingOverlayLoaded(tab.linkedBrowser);
-  await BrowserTestUtils.synthesizeMouseAtCenter("#onboarding-overlay-button", {}, tab.linkedBrowser);
-  await promiseOnboardingOverlayOpened(tab.linkedBrowser);
+  let browser = tab.linkedBrowser;
+  await promiseOnboardingOverlayLoaded(browser);
+  await BrowserTestUtils.synthesizeMouseAtCenter("#onboarding-overlay-button", {}, browser);
+  await promiseOnboardingOverlayOpened(browser);
 
-  ok(!gBrowser.contentDocumentAsCPOW.querySelector("#onboarding-skip-tour-button"), "should not render the skip button");
+  let hasTourButton = await ContentTask.spawn(browser, null, () => {
+    return content.document.querySelector("#onboarding-skip-tour-button") != null;
+  });
+
+  ok(!hasTourButton, "should not render the skip button");
 
   BrowserTestUtils.removeTab(tab);
 });