Bug 1248603 - Toggle developer toolbar via the menuitem in tests. r=jryans
authorAlexandre Poirot <poirot.alex@gmail.com>
Fri, 01 Apr 2016 05:49:00 -0700
changeset 291389 0b016f319532937405bf971cdb1e426e81bc35f5
parent 291388 836da2d40b19d6503e640897e7834ed36a8e8dab
child 291390 9b9b8514c6b0479d470b0c30f84b6e9552591da5
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)
reviewersjryans
bugs1248603
milestone48.0a1
Bug 1248603 - Toggle developer toolbar via the menuitem in tests. r=jryans
devtools/client/shared/test/browser_toolbar_basic.js
devtools/client/shared/test/browser_toolbar_tooltip.js
--- a/devtools/client/shared/test/browser_toolbar_basic.js
+++ b/devtools/client/shared/test/browser_toolbar_basic.js
@@ -7,17 +7,17 @@ const TEST_URI = TEST_URI_ROOT + "browse
 
 add_task(function*() {
   info("Starting browser_toolbar_basic.js");
   yield addTab(TEST_URI);
 
   ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in to start");
 
   let shown = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW);
-  document.getElementById("Tools:DevToolbar").doCommand();
+  document.getElementById("menu_devToolbar").doCommand();
   yield shown;
   ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in checkOpen");
 
   let close = document.getElementById("developer-toolbar-closebutton");
   ok(close, "Close button exists");
 
   let toggleToolbox =
     document.getElementById("devtoolsMenuBroadcaster_DevToolbox");
@@ -30,22 +30,22 @@ add_task(function*() {
   yield addTab("about:blank");
   info("Opened a new tab");
 
   ok(!isChecked(toggleToolbox), "toggle toolbox button is not checked");
 
   gBrowser.removeCurrentTab();
 
   let hidden = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE);
-  document.getElementById("Tools:DevToolbar").doCommand();
+  document.getElementById("menu_devToolbar").doCommand();
   yield hidden;
   ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in hidden");
 
   shown = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.SHOW);
-  document.getElementById("Tools:DevToolbar").doCommand();
+  document.getElementById("menu_devToolbar").doCommand();
   yield shown;
   ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in after open");
 
   ok(isChecked(toggleToolbox), "toggle toolbox button is checked");
 
   hidden = oneTimeObserve(DeveloperToolbar.NOTIFICATIONS.HIDE);
   document.getElementById("developer-toolbar-closebutton").doCommand();
   yield hidden;
--- a/devtools/client/shared/test/browser_toolbar_tooltip.js
+++ b/devtools/client/shared/test/browser_toolbar_tooltip.js
@@ -21,17 +21,17 @@ registerCleanupFunction(() => {
 add_task(function* showToolbar() {
   yield addTab(TEST_URI);
 
   info("Starting browser_toolbar_tooltip.js");
 
   ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in runTest");
 
   let showPromise = observeOnce(DeveloperToolbar.NOTIFICATIONS.SHOW);
-  document.getElementById("Tools:DevToolbar").doCommand();
+  document.getElementById("menu_devToolbar").doCommand();
   yield showPromise;
 });
 
 add_task(function* testDimensions() {
   let tooltipPanel = DeveloperToolbar.tooltipPanel;
 
   DeveloperToolbar.focusManager.helpRequest();
   yield DeveloperToolbar.inputter.setInput('help help');
@@ -80,17 +80,17 @@ add_task(function* testThemes() {
 add_task(function* hideToolbar() {
   info("Ending browser_toolbar_tooltip.js");
   yield DeveloperToolbar.inputter.setInput('');
 
   ok(DeveloperToolbar.visible, "DeveloperToolbar is visible in hideToolbar");
 
   info("Hide toolbar");
   let hidePromise = observeOnce(DeveloperToolbar.NOTIFICATIONS.HIDE);
-  document.getElementById("Tools:DevToolbar").doCommand();
+  document.getElementById("menu_devToolbar").doCommand();
   yield hidePromise;
 
   ok(!DeveloperToolbar.visible, "DeveloperToolbar is not visible in hideToolbar");
 
   info("Done test");
 });
 
 function getLeftMargin() {