Bug 1240594 - Update tests that touch about:certerror. r=Gijs
authorNihanth Subramanya <nhnt11@gmail.com>
Tue, 15 Mar 2016 02:36:21 -0700
changeset 292118 6c75ca57566bae6b9586fd843e90616f919c666f
parent 292117 9bebd608252d7620b1e4977363cec3bc2c37ec36
child 292119 133d8859d7b5e7d44d74c66aaa52c2da30cab3c4
push id74762
push usercbook@mozilla.com
push dateThu, 07 Apr 2016 09:56:20 +0000
treeherdermozilla-inbound@772253c53374 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1240594
milestone48.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 1240594 - Update tests that touch about:certerror. r=Gijs MozReview-Commit-ID: 6dUWaq6eNbZ
browser/base/content/test/general/browser_bug431826.js
browser/base/content/test/general/browser_bug633691.js
browser/base/content/test/general/browser_misused_characters_in_strings.js
--- a/browser/base/content/test/general/browser_bug431826.js
+++ b/browser/base/content/test/general/browser_bug431826.js
@@ -17,36 +17,36 @@ add_task(function* () {
     // Confirm that we are displaying the contributed error page, not the default
     let uri = content.document.documentURI;
     Assert.ok(uri.startsWith("about:certerror"), "Broken page should go to about:certerror, not about:neterror");
   });
 
   let advancedDiv, advancedDivVisibility, technicalDivCollapsed;
 
   yield remote(() => {
-    let div = content.document.getElementById("advancedPanel");
+    let div = content.document.getElementById("badCertAdvancedPanel");
     // Confirm that the expert section is collapsed
     Assert.ok(div, "Advanced content div should exist");
-    Assert.equal(div.ownerDocument.defaultView.getComputedStyle(div, "").visibility,
-      "hidden", "Advanced content should not be visible by default");
+    Assert.equal(div.ownerDocument.defaultView.getComputedStyle(div, "").display,
+      "none", "Advanced content should not be visible by default");
   });
 
   // Tweak the expert mode pref
   gPrefService.setBoolPref("browser.xul.error_pages.expert_bad_cert", true);
 
   promise = remote(function () {
     return ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", true);
   });
   gBrowser.reload();
   yield promise;
 
   yield remote(() => {
-    let div = content.document.getElementById("advancedPanel");
+    let div = content.document.getElementById("badCertAdvancedPanel");
     Assert.ok(div, "Advanced content div should exist");
-    Assert.equal(div.ownerDocument.defaultView.getComputedStyle(div, "").visibility,
-      "visible", "Advanced content should be visible by default");
+    Assert.equal(div.ownerDocument.defaultView.getComputedStyle(div, "").display,
+      "block", "Advanced content should be visible by default");
   });
 
   // Clean up
   gBrowser.removeCurrentTab();
   if (gPrefService.prefHasUserValue("browser.xul.error_pages.expert_bad_cert"))
     gPrefService.clearUserPref("browser.xul.error_pages.expert_bad_cert");
 });
--- a/browser/base/content/test/general/browser_bug633691.js
+++ b/browser/base/content/test/general/browser_bug633691.js
@@ -1,23 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 function test() {
   waitForExplicitFinish();
-  gBrowser.selectedTab = gBrowser.addTab("data:text/html,<iframe width='700' height='700' src='about:certerror'></iframe>");
+  gBrowser.selectedTab = gBrowser.addTab("data:text/html,<iframe width='700' height='700' src='about:certerror?e=nssBadCert&u='></iframe>");
   // Open a html page with about:certerror in an iframe
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(testIframeCert);
 }
 
 function testIframeCert(e) {
   // Confirm that the expert section is hidden
   var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
-  var aP = doc.getElementById("advancedPanel");
+  var aP = doc.getElementById("badCertAdvancedPanel");
   ok(aP, "Advanced content should exist");
   is_element_hidden(aP, "Advanced content should not be visible by default")
 
   // Clean up
   gBrowser.removeCurrentTab();
 
   finish();
 }
--- a/browser/base/content/test/general/browser_misused_characters_in_strings.js
+++ b/browser/base/content/test/general/browser_misused_characters_in_strings.js
@@ -8,22 +8,22 @@
  * As each issue is found in the whitelist, it is removed from the list. At
  * the end of the test, there is an assertion that all items have been
  * removed from the whitelist, thus ensuring there are no stale entries. */
 let gWhitelist = [{
     file: "search.properties",
     key: "searchForSomethingWith",
     type: "single-quote"
   }, {
-    file: "aboutCertError.dtd",
-    key: "certerror.introPara",
+    file: "browser.dtd",
+    key: "social.activated.description",
     type: "single-quote"
   }, {
-    file: "browser.dtd",
-    key: "social.activated.description",
+    file: "netError.dtd",
+    key: "certerror.introPara",
     type: "single-quote"
   }, {
     file: "netError.dtd",
     key: "weakCryptoAdvanced.longDesc",
     type: "single-quote"
   }, {
     file: "netError.dtd",
     key: "weakCryptoAdvanced.override",