Bug 1245355 - Add a unit test for tabs.getAllInWindow. r=kmag
authorMatthew Wein <mwein@mozilla.com>
Thu, 17 Mar 2016 09:35:58 +0100
changeset 291363 abba7d7115a474289ad30f375ce2e95e3af52f58
parent 291362 b9ad1239e4b24d82932da5794babb9ab98750400
child 291364 642e91672f8ae6738f48c93d0846d65dbc0eb2f2
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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,