Bug 1587914 - Fix browser_ext_tabs_readerMode.js with Fission r=kmag
authorTomislav Jovanovic <tomica@gmail.com>
Thu, 10 Oct 2019 22:42:41 +0000
changeset 497195 4da82587c122cb613c53738ae6a2f0db8f30aab0
parent 497194 e2e7da01948565b12063332b46a9dbe266f0b0d0
child 497196 30c22dd7539efb3b5039aab5dc193a210cf32902
push id36679
push userdluca@mozilla.com
push dateFri, 11 Oct 2019 09:30:10 +0000
treeherdermozilla-central@a7ca5ad33f3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1587914
milestone71.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 1587914 - Fix browser_ext_tabs_readerMode.js with Fission r=kmag Differential Revision: https://phabricator.services.mozilla.com/D48896
browser/components/extensions/test/browser/browser.ini
browser/components/extensions/test/browser/browser_ext_tabs_readerMode.js
--- a/browser/components/extensions/test/browser/browser.ini
+++ b/browser/components/extensions/test/browser/browser.ini
@@ -248,17 +248,16 @@ skip-if = true # Bug 1521363
 [browser_ext_tabs_onCreated.js]
 [browser_ext_tabs_onHighlighted.js]
 [browser_ext_tabs_onUpdated.js]
 [browser_ext_tabs_onUpdated_filter.js]
 [browser_ext_tabs_opener.js]
 [browser_ext_tabs_printPreview.js]
 [browser_ext_tabs_query.js]
 [browser_ext_tabs_readerMode.js]
-skip-if = fission
 [browser_ext_tabs_reload.js]
 [browser_ext_tabs_reload_bypass_cache.js]
 [browser_ext_tabs_saveAsPDF.js]
 skip-if = os == 'mac' # Save as PDF not supported on Mac OS X
 [browser_ext_tabs_sendMessage.js]
 [browser_ext_tabs_sharingState.js]
 [browser_ext_tabs_successors.js]
 [browser_ext_tabs_cookieStoreId.js]
--- a/browser/components/extensions/test/browser/browser_ext_tabs_readerMode.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_readerMode.js
@@ -54,38 +54,36 @@ add_task(async function test_reader_mode
               "The tab is in reader mode."
             );
             browser.tabs.toggleReaderMode(tabId);
             break;
         }
       });
 
       browser.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
-        if (tab.url !== "about:blank") {
-          if (changeInfo.status === "complete") {
-            testState.url = tab.url;
-            let urlOk = expected.isInReaderMode
-              ? testState.url.startsWith("about:reader")
-              : expected.url == testState.url;
-            if (urlOk && expected.isArticle == testState.isArticle) {
-              browser.test.sendMessage("tabUpdated", tab);
-            }
-            return;
+        if (changeInfo.status === "complete") {
+          testState.url = tab.url;
+          let urlOk = expected.isInReaderMode
+            ? testState.url.startsWith("about:reader")
+            : expected.url == testState.url;
+          if (urlOk && expected.isArticle == testState.isArticle) {
+            browser.test.sendMessage("tabUpdated", tab);
           }
-          if (
-            changeInfo.isArticle == expected.isArticle &&
-            changeInfo.isArticle != testState.isArticle
-          ) {
-            testState.isArticle = changeInfo.isArticle;
-            let urlOk = expected.isInReaderMode
-              ? testState.url.startsWith("about:reader")
-              : expected.url == testState.url;
-            if (urlOk && expected.isArticle == testState.isArticle) {
-              browser.test.sendMessage("isArticle", tab);
-            }
+          return;
+        }
+        if (
+          changeInfo.isArticle == expected.isArticle &&
+          changeInfo.isArticle != testState.isArticle
+        ) {
+          testState.isArticle = changeInfo.isArticle;
+          let urlOk = expected.isInReaderMode
+            ? testState.url.startsWith("about:reader")
+            : expected.url == testState.url;
+          if (urlOk && expected.isArticle == testState.isArticle) {
+            browser.test.sendMessage("isArticle", tab);
           }
         }
       });
     },
   });
 
   const TEST_PATH = getRootDirectory(gTestPath).replace(
     "chrome://mochitests/content",