Bug 1240594 - Update tests that touch about:certerror. r=Gijs

MozReview-Commit-ID: 6dUWaq6eNbZ

--HG--
extra : rebase_source : bfb82cddf504f53e20cb2b142ff5aba9f660b52c
This commit is contained in:
Nihanth Subramanya 2016-03-15 02:36:21 -07:00
Родитель 5105f59732
Коммит d6aa2b1eb9
3 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -22,11 +22,11 @@ add_task(function* () {
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
@ -39,10 +39,10 @@ add_task(function* () {
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

Просмотреть файл

@ -4,7 +4,7 @@
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);
}
@ -12,7 +12,7 @@ function test() {
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")

Просмотреть файл

@ -12,14 +12,14 @@ let gWhitelist = [{
file: "search.properties",
key: "searchForSomethingWith",
type: "single-quote"
}, {
file: "aboutCertError.dtd",
key: "certerror.introPara",
type: "single-quote"
}, {
file: "browser.dtd",
key: "social.activated.description",
type: "single-quote"
}, {
file: "netError.dtd",
key: "certerror.introPara",
type: "single-quote"
}, {
file: "netError.dtd",
key: "weakCryptoAdvanced.longDesc",