Bug 1242715 - Added labels to controls and added test cases. r=pbro draft
authorNancy Pang <npang@mozilla.com>
Thu, 19 May 2016 10:03:58 -0400
changeset 368708 05e8df05f8e1778ae09b706770fd688e2c57cc52
parent 367490 966a5c060e93043f164f8256ac31bea0e8aa1cab
child 521369 cfd2278932e3442ea7f0d58ebd408058e76861a6
push id18637
push userbmo:npang@mozilla.com
push dateThu, 19 May 2016 14:04:06 +0000
reviewerspbro
bugs1242715
milestone49.0a1
Bug 1242715 - Added labels to controls and added test cases. r=pbro MozReview-Commit-ID: HGGTeshLBDs
devtools/client/inspector/inspector-panel.js
devtools/client/inspector/test/browser_inspector_pane-toggle-01.js
devtools/client/locales/en-US/netmonitor.dtd
devtools/client/netmonitor/netmonitor.xul
--- a/devtools/client/inspector/inspector-panel.js
+++ b/devtools/client/inspector/inspector-panel.js
@@ -397,16 +397,18 @@ InspectorPanel.prototype = {
     this.setupSidebarToggle();
   },
 
   /**
    * Add the expand/collapse behavior for the sidebar panel.
    */
   setupSidebarToggle: function() {
     this._paneToggleButton = this.panelDoc.getElementById("inspector-pane-toggle");
+    this._paneToggleButton.setAttribute("tooltiptext",
+      strings.GetStringFromName("inspector.collapsePane"));
     this._paneToggleButton.addEventListener("mousedown",
       this.onPaneToggleButtonClicked);
   },
 
   /**
    * Reset the inspector on new root mutation.
    */
   onNewRoot: function() {
--- a/devtools/client/inspector/test/browser_inspector_pane-toggle-01.js
+++ b/devtools/client/inspector/test/browser_inspector_pane-toggle-01.js
@@ -8,16 +8,17 @@
 
 add_task(function* () {
   info("Open the inspector in a bottom toolbox host");
   let {toolbox, inspector} = yield openInspectorForURL("about:blank", "bottom");
 
   let button = inspector.panelDoc.getElementById("inspector-pane-toggle");
   ok(button, "The toggle button exists in the DOM");
   is(button.parentNode.id, "inspector-toolbar", "The toggle button is in the toolbar");
+  ok(button.getAttribute("tooltiptext"), "The tool tip has initial state");
   ok(!button.hasAttribute("pane-collapsed"), "The button is in expanded state");
   ok(!!button.getClientRects().length, "The button is visible");
 
   info("Switch the host to side type");
   yield toolbox.switchHost("side");
 
   ok(!!button.getClientRects().length, "The button is still visible");
   ok(!button.hasAttribute("pane-collapsed"),
--- a/devtools/client/locales/en-US/netmonitor.dtd
+++ b/devtools/client/locales/en-US/netmonitor.dtd
@@ -6,20 +6,21 @@
 <!-- LOCALIZATION NOTE : FILE Do not translate commandkey -->
 
 <!-- LOCALIZATION NOTE : FILE The correct localization of this file might be to
   - keep it in English, or another language commonly spoken among web developers.
   - You want to make that choice consistent across the developer tools.
   - A good criteria is the language in which you'd find the best
   - documentation on web development on the web. -->
 
-<!-- LOCALIZATION NOTE (netmonitorUI.perfNotice1/2): These are the labels displayed
+<!-- LOCALIZATION NOTE (netmonitorUI.perfNotice1/2/3): These are the labels displayed
   -  in the network table when empty to start performance analysis. -->
 <!ENTITY netmonitorUI.perfNotice1         "• Click on the">
 <!ENTITY netmonitorUI.perfNotice2         "button to start performance analysis.">
+<!ENTITY netmonitorUI.perfNotice3         "Analyze">
 
 <!-- LOCALIZATION NOTE (netmonitorUI.reload1/2/3): These are the labels displayed
   -  in the network table when empty to start logging network requests. -->
 <!ENTITY netmonitorUI.reloadNotice1       "• Perform a request or">
 <!ENTITY netmonitorUI.reloadNotice2       "Reload">
 <!ENTITY netmonitorUI.reloadNotice3       "the page to see detailed information about network activity.">
 
 <!-- LOCALIZATION NOTE (netmonitorUI.toolbar.status2): This is the label displayed
--- a/devtools/client/netmonitor/netmonitor.xul
+++ b/devtools/client/netmonitor/netmonitor.xul
@@ -257,16 +257,17 @@
               <hbox id="requests-menu-waterfall-header-box"
                     class="requests-menu-header requests-menu-waterfall"
                     align="center"
                     flex="1">
                 <button id="requests-menu-waterfall-button"
                         class="requests-menu-header-button requests-menu-waterfall"
                         data-key="waterfall"
                         pack="start"
+                        label="&netmonitorUI.toolbar.waterfall;"
                         flex="1">
                   <image id="requests-menu-waterfall-image"/>
                   <box id="requests-menu-waterfall-label-wrapper">
                     <label id="requests-menu-waterfall-label"
                            class="plain requests-menu-waterfall"
                            value="&netmonitorUI.toolbar.waterfall;"/>
                   </box>
                 </button>
@@ -283,16 +284,17 @@
                       standalone="true"
                       label="&netmonitorUI.reloadNotice2;"/>
               <label value="&netmonitorUI.reloadNotice3;"/>
             </hbox>
             <hbox id="notice-perf-message" align="center">
               <label value="&netmonitorUI.perfNotice1;"/>
               <button id="requests-menu-perf-notice-button"
                       standalone="true"
+                      label="&netmonitorUI.perfNotice3;"
                       class="devtools-toolbarbutton"/>
               <label value="&netmonitorUI.perfNotice2;"/>
             </hbox>
           </vbox>
 
           <vbox id="requests-menu-contents" flex="1" context="network-request-popup">
             <hbox id="requests-menu-item-template" hidden="true">
               <hbox class="requests-menu-subitem requests-menu-status"