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 291336 abba7d7115a474289ad30f375ce2e95e3af52f58
parent 291335 b9ad1239e4b24d82932da5794babb9ab98750400
child 291337 642e91672f8ae6738f48c93d0846d65dbc0eb2f2
push id74545
push userkwierso@gmail.com
push dateFri, 01 Apr 2016 23:05:42 +0000
treeherdermozilla-inbound@c410d4e20586 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1245355
milestone48.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 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,