Bug 1359855 - Remove assertion for dynamic key registration. r=jdescottes
☠☠ backed out by 5c5cd7954f5c ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 13 Jul 2017 15:24:55 +0200
changeset 370509 dbd03e7e1bc5aad3148a1b1ef69361bf30e041ef
parent 370508 061f66345448fc97217523a257522e2ca743883e
child 370510 2dd30b065030bab3f0e2b231822302eda90b6039
push id47052
push userapoirot@mozilla.com
push dateMon, 24 Jul 2017 09:16:15 +0000
treeherderautoland@2dd30b065030 [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()