Bug 1245355: Add a unit test for tabs.getAllInWindow. r?kmag
MozReview-Commit-ID: 5wVRCLdCuq9
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -537,24 +537,16 @@ extensions.registerSchemaAPI("tabs", nul
getCurrent() {
let tab;
if (context.tabId) {
tab = TabManager.convert(extension, TabManager.getTab(context.tabId));
}
return Promise.resolve(tab);
},
- getAllInWindow: function(windowId) {
- if (windowId === null) {
- windowId = WindowManager.topWindow.windowId;
- }
-
- return self.tabs.query({windowId});
- },
-
query: function(queryInfo) {
let pattern = null;
if (queryInfo.url !== null) {
if (!extension.hasPermission("tabs")) {
return Promise.reject({message: 'The "tabs" permission is required to use the query API with the "url" parameter'});
}
pattern = new MatchPattern(queryInfo.url);
--- a/browser/components/extensions/schemas/tabs.json
+++ b/browser/components/extensions/schemas/tabs.json
@@ -313,18 +313,19 @@
"parameters": [
{"name": "tab", "$ref": "Tab"}
]
}
]
},
{
"name": "getAllInWindow",
+ "deprecated": "Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.",
+ "unsupported": true,
"type": "function",
- "deprecated": "Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.",
"description": "Gets details about all tabs in the specified window.",
"async": "callback",
"parameters": [
{
"type": "integer",
"name": "windowId",
"minimum": -2,
"optional": true,