Bug 1405793 - Port bug 1401946 to TB [Show profile path next to the open button]. r=aceman
authorRichard Marti <richard.marti@gmail.com>
Thu, 05 Oct 2017 08:09:30 +0200
changeset 29116 38273b6b8bb0d56e742846515141881a680fd4a3
parent 29115 66b336c0c7f7165ed34ca5aecfe243acf2ba8f4b
child 29117 63b02690e4f5192b35a4b81d97244eee0203d532
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1405793, 1401946
Bug 1405793 - Port bug 1401946 to TB [Show profile path next to the open button]. r=aceman
mail/components/about-support/content/aboutSupport.js
mail/components/about-support/content/aboutSupport.xhtml
mail/test/mozmill/content-tabs/test-about-support.js
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -126,26 +126,24 @@ var snapshotFormatters = {
     $("key-mozilla-box").textContent = strings.GetStringFromName(keyMozillaFound);
 
     $("safemode-box").textContent = data.safeMode;
 
     // added for TB
     // Add profile path as private info into the page.
     let currProfD = Services.dirsvc.get("ProfD", Ci.nsIFile);
     let profElem = document.getElementById("profile-dir-button").parentNode;
-    let profDirNode = document.createElement("span");
+    let profDirNode = document.getElementById("profile-dir-box");
     profDirNode.setAttribute("class", CLASS_DATA_PRIVATE);
-    profDirNode.setAttribute("id", "profile-dir-path");
     let profLinkNode = document.createElement("a");
     profLinkNode.setAttribute("href", Services.io.newFileURI(currProfD).spec);
     profLinkNode.setAttribute("onclick", "openProfileDirectory(); event.preventDefault();");
     let profPathNode = document.createTextNode(currProfD.path);
     profLinkNode.appendChild(profPathNode);
     profDirNode.appendChild(profLinkNode);
-    profElem.appendChild(profDirNode);
     profElem.appendChild(document.createTextNode(" "));
 
     // Show type of filesystem detected.
     let fsType;
     try {
       fsType = AboutSupportPlatform.getFileSystemType(currProfD);
       let bundle = Services.strings.createBundle(
         "chrome://messenger/locale/aboutSupportMail.properties");
--- a/mail/components/about-support/content/aboutSupport.xhtml
+++ b/mail/components/about-support/content/aboutSupport.xhtml
@@ -188,16 +188,18 @@
 #else
 #ifdef XP_MACOSX
                 &aboutSupport.showMac.label;
 #else
                 &aboutSupport.showDir.label;
 #endif
 #endif
                </button>
+               <span id="profile-dir-box">
+               </span>
             </td>
           </tr>
 
           <tr class="no-copy">
             <th class="column">
               &aboutSupport.appBasicsEnabledPlugins;
             </th>
 
--- a/mail/test/mozmill/content-tabs/test-about-support.js
+++ b/mail/test/mozmill/content-tabs/test-about-support.js
@@ -202,17 +202,17 @@ function test_modified_pref_on_blacklist
  */
 function test_private_data() {
   let tab = open_about_support();
   let checkbox = content_tab_eid(tab, "check-show-private-data");
 
   // We use the profile path and some other element as an example
   // of a private-only element.
   let privateElem1 = find_private_element(tab);
-  let privateElem2 = content_tab_e(tab, "profile-dir-path");;
+  let privateElem2 = content_tab_e(tab, "profile-dir-box");
   // We use the profile button as an example of a public element.
   let publicElem = content_tab_e(tab, "profile-dir-button");
 
   assert_true(!checkbox.checked,
               "Private data checkbox shouldn't be checked by default");
   assert_content_tab_element_visible(tab, publicElem);
   assert_content_tab_element_hidden(tab, privateElem1);
   assert_content_tab_element_hidden(tab, privateElem2);