Bug 1576832 - Fix the info and check of the ETP state to use the right browser object for the test 'browser_protections_UI.js' r=nhnt11
authorTim Huang <tihuang@mozilla.com>
Tue, 27 Aug 2019 09:31:15 +0000
changeset 553775 2187d722dc389e70f1f0f93ac0195f31e3fab8c8
parent 553774 9a85c28fd033545e63ac5851f71c4d34a9436d28
child 553776 19f1235e5f70ace9207e64add8cdf65320e92e95
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnhnt11
bugs1576832
milestone70.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 1576832 - Fix the info and check of the ETP state to use the right browser object for the test 'browser_protections_UI.js' r=nhnt11 Differential Revision: https://phabricator.services.mozilla.com/D43586
browser/base/content/test/siteProtections/browser_protections_UI.js
--- a/browser/base/content/test/siteProtections/browser_protections_UI.js
+++ b/browser/base/content/test/siteProtections/browser_protections_UI.js
@@ -601,24 +601,23 @@ add_task(async function testQuickSwitchT
   gBrowser.selectedTab = tabOne;
 
   // Wait for the second tab to be reloaded.
   await browserLoadedPromise;
 
   // Check that the first tab is still with ETP enabled.
   ok(
     !ContentBlockingAllowList.includes(gBrowser.selectedBrowser),
-    "The tracking protection icon state is still enabled."
+    "The ETP state of the first tab is still enabled."
   );
 
   // Check the ETP is disabled on the second origin.
-  gBrowser.selectedTab = tabTwo;
   ok(
-    ContentBlockingAllowList.includes(gBrowser.selectedBrowser),
-    "The tracking protection icon state has been changed to disabled."
+    ContentBlockingAllowList.includes(tabTwo.linkedBrowser),
+    "The ETP state of the second tab has been changed to disabled."
   );
 
   BrowserTestUtils.removeTab(tabOne);
   BrowserTestUtils.removeTab(tabTwo);
 
   // Finally, clear the tracking database.
   await TrackingDBService.clearAll();
 });