browser/base/content/test/general/browser_bug633691.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/general/browser_bug633691.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 + * http://creativecommons.org/publicdomain/zero/1.0/
     1.6 + */
     1.7 +
     1.8 +function test() {
     1.9 +  waitForExplicitFinish();
    1.10 +  gBrowser.selectedTab = gBrowser.addTab();
    1.11 +  // Open a html page with about:certerror in an iframe
    1.12 +  window.content.addEventListener("load", testIframeCert, true);
    1.13 +  content.location = "data:text/html,<iframe width='700' height='700' src='about:certerror'></iframe>";
    1.14 +}
    1.15 +
    1.16 +function testIframeCert() {
    1.17 +  window.content.removeEventListener("load", testIframeCert, true);
    1.18 +  // Confirm that the expert section is hidden
    1.19 +  var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
    1.20 +  var eC = doc.getElementById("expertContent");
    1.21 +  ok(eC, "Expert content should exist")
    1.22 +  ok(eC.hasAttribute("hidden"), "Expert content should be hidded by default");
    1.23 +
    1.24 +  // Clean up
    1.25 +  gBrowser.removeCurrentTab();
    1.26 +  
    1.27 +  finish();
    1.28 +}

mercurial