Bug 1245355: Add a unit test for tabs.getAllInWindow. r?kmag draft
authorMatthew Wein <mwein@mozilla.com>
Thu, 17 Mar 2016 09:35:58 +0100
changeset 344803 b089cbf59cc8a794ba4a1c7abe1a5599bea4d0ae
parent 344771 4683436610b91a55eed5589c1d4affd207a68480
child 517050 ee75b509df9eff314569231372035a279946a0e5
push id13930
push usermwein@mozilla.com
push dateFri, 25 Mar 2016 21:38:43 +0000
reviewerskmag
bugs1245355
milestone48.0a1
Bug 1245355: Add a unit test for tabs.getAllInWindow. r?kmag MozReview-Commit-ID: 5wVRCLdCuq9
browser/components/extensions/ext-tabs.js
browser/components/extensions/schemas/tabs.json
--- 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,