Bug 1405793 - Port
bug 1401946 to TB [Show profile path next to the open button]. r=aceman
--- 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);