Bug 1359855 - Remove assertion for dynamic key registration. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 13 Jul 2017 15:24:55 +0200
changeset 419351 4ec28f94e2848a73f357c965c92bf133b221e937
parent 419350 c379b1dfb233940688545af20939bd85c89f7cfc
child 419352 ff507dd06af9bce63188818602b624f5de3d1412
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1359855
milestone56.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 1359855 - Remove assertion for dynamic key registration. r=jdescottes Per definition of this bug/patch, key shortcuts can't be registered anymore. It mostly means that add-on definition a key shortcut won't keep their key shortcut working. This shouldn't be an issue on 57 as I don't think WebExtension addon can set a key shortcut via this DevTools API. MozReview-Commit-ID: G5c8JzaUWoR
devtools/client/framework/test/browser_toolbox_dynamic_registration.js
--- a/devtools/client/framework/test/browser_toolbox_dynamic_registration.js
+++ b/devtools/client/framework/test/browser_toolbox_dynamic_registration.js
@@ -21,17 +21,16 @@ function testRegister(aToolbox)
   gDevTools.once("tool-registered", toolRegistered);
 
   gDevTools.registerTool({
     id: "test-tool",
     label: "Test Tool",
     inMenu: true,
     isTargetSupported: () => true,
     build: function () {},
-    key: "t"
   });
 }
 
 function toolRegistered(event, toolId)
 {
   is(toolId, "test-tool", "tool-registered event handler sent tool id");
 
   ok(gDevTools.getToolDefinitionMap().has(toolId), "tool added to map");
@@ -40,18 +39,16 @@ function toolRegistered(event, toolId)
   let doc = toolbox.doc;
   let tab = doc.getElementById("toolbox-tab-" + toolId);
   ok(tab, "new tool's tab exists in toolbox UI");
 
   let panel = doc.getElementById("toolbox-panel-" + toolId);
   ok(panel, "new tool's panel exists in toolbox UI");
 
   for (let win of getAllBrowserWindows()) {
-    let key = win.document.getElementById("key_" + toolId);
-    ok(key, "key for new tool added to every browser window");
     let menuitem = win.document.getElementById("menuitem_" + toolId);
     ok(menuitem, "menu item of new tool added to every browser window");
   }
 
   // then unregister it
   testUnregister();
 }
 
@@ -81,18 +78,16 @@ function toolUnregistered(event, toolId)
   let doc = toolbox.doc;
   let tab = doc.getElementById("toolbox-tab-" + toolId);
   ok(!tab, "tool's tab was removed from the toolbox UI");
 
   let panel = doc.getElementById("toolbox-panel-" + toolId);
   ok(!panel, "tool's panel was removed from toolbox UI");
 
   for (let win of getAllBrowserWindows()) {
-    let key = win.document.getElementById("key_" + toolId);
-    ok(!key, "key removed from every browser window");
     let menuitem = win.document.getElementById("menuitem_" + toolId);
     ok(!menuitem, "menu item removed from every browser window");
   }
 
   cleanup();
 }
 
 function cleanup()