зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1465520 - Remove deprecated isarticle filter for tabs.onUpdated r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D48263 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
039428b2b7
Коммит
5e51e18be7
|
@ -214,14 +214,6 @@ class TabsUpdateFilterEventManager extends EventManager {
|
|||
// 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;
|
||||
}
|
||||
|
|
|
@ -300,7 +300,6 @@
|
|||
"discarded",
|
||||
"favIconUrl",
|
||||
"hidden",
|
||||
"isarticle",
|
||||
"isArticle",
|
||||
"mutedInfo",
|
||||
"pinned",
|
||||
|
|
|
@ -251,39 +251,6 @@ add_task(async function test_filter_windowId() {
|
|||
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: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче