|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ |
|
3 */ |
|
4 |
|
5 function test() { |
|
6 waitForExplicitFinish(); |
|
7 gBrowser.selectedTab = gBrowser.addTab(); |
|
8 // Open a html page with about:certerror in an iframe |
|
9 window.content.addEventListener("load", testIframeCert, true); |
|
10 content.location = "data:text/html,<iframe width='700' height='700' src='about:certerror'></iframe>"; |
|
11 } |
|
12 |
|
13 function testIframeCert() { |
|
14 window.content.removeEventListener("load", testIframeCert, true); |
|
15 // Confirm that the expert section is hidden |
|
16 var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument; |
|
17 var eC = doc.getElementById("expertContent"); |
|
18 ok(eC, "Expert content should exist") |
|
19 ok(eC.hasAttribute("hidden"), "Expert content should be hidded by default"); |
|
20 |
|
21 // Clean up |
|
22 gBrowser.removeCurrentTab(); |
|
23 |
|
24 finish(); |
|
25 } |