Bug 1465520 - Remove deprecated isarticle filter for tabs.onUpdated r=mixedpuppy
authorTomislav Jovanovic <tomica@gmail.com>
Sat, 05 Oct 2019 21:19:08 +0000
changeset 496460 9e28f08d69e558d1b76ae3fa8c24691e8e17ab49
parent 496459 f4719f626670ccd72c2c7e40302b1aec2ab093f5
child 496461 a219d05a2791832d81fc18d28d5aa5063ddcea59
push id97256
push usertjovanovic@mozilla.com
push dateSun, 06 Oct 2019 14:40:57 +0000
treeherderautoland@9e28f08d69e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1465520
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 1465520 - Remove deprecated isarticle filter for tabs.onUpdated r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D48263
browser/components/extensions/parent/ext-tabs.js
browser/components/extensions/schemas/tabs.json
browser/components/extensions/test/browser/browser_ext_tabs_onUpdated_filter.js
--- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js
@@ -209,24 +209,16 @@ class TabsUpdateFilterEventManager exten
           restrictSchemes: false,
         });
       }
       let needsModified = true;
       if (filter.properties) {
         // Default is to listen for all events.
         needsModified = filter.properties.some(p => allAttrs.has(p));
         filter.properties = new Set(filter.properties);
-        // TODO Bug 1465520 remove warning when ready.
-        if (filter.properties.has("isarticle")) {
-          extension.logger.warn(
-            "The isarticle filter name is deprecated, use isArticle."
-          );
-          filter.properties.delete("isarticle");
-          filter.properties.add("isArticle");
-        }
       } else {
         filter.properties = allProperties;
       }
 
       function sanitize(extension, changeInfo) {
         let result = {};
         let nonempty = false;
         let hasTabs = extension.hasPermission("tabs");
--- a/browser/components/extensions/schemas/tabs.json
+++ b/browser/components/extensions/schemas/tabs.json
@@ -295,17 +295,16 @@
         "id": "UpdatePropertyName",
         "type": "string",
         "enum": [
           "attention",
           "audible",
           "discarded",
           "favIconUrl",
           "hidden",
-          "isarticle",
           "isArticle",
           "mutedInfo",
           "pinned",
           "sharingState",
           "status",
           "title"
         ],
         "description": "Event names supported in onUpdated."
--- a/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated_filter.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated_filter.js
@@ -246,49 +246,16 @@ add_task(async function test_filter_wind
 
   await ext_ok.unload();
   await ext_ok2.unload();
   await ext_fail.unload();
 
   await BrowserTestUtils.removeTab(tab);
 });
 
-// TODO Bug 1465520 test should be removed when filter name is.
-add_task(async function test_filter_isarticle_deprecated() {
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      permissions: ["tabs"],
-    },
-    background() {
-      // We expect only status updates, anything else is a failure.
-      browser.tabs.onUpdated.addListener(
-        (tabId, changeInfo) => {
-          browser.test.log(`got onUpdated ${JSON.stringify(changeInfo)}`);
-          if ("isArticle" in changeInfo) {
-            browser.test.notifyPass("isarticle");
-          }
-        },
-        { properties: ["isarticle"] }
-      );
-    },
-  });
-  await extension.startup();
-  let ok = extension.awaitFinish("isarticle");
-
-  let tab = await BrowserTestUtils.openNewForegroundTab(
-    gBrowser,
-    "http://mochi.test:8888/"
-  );
-  await ok;
-
-  await extension.unload();
-
-  await BrowserTestUtils.removeTab(tab);
-});
-
 add_task(async function test_filter_isArticle() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       permissions: ["tabs"],
     },
     background() {
       // We expect only status updates, anything else is a failure.
       browser.tabs.onUpdated.addListener(