Bug 633691 - Add automated test. r=jaws
authorIoana Budnar <ioana.budnar@softvision.ro>
Thu, 21 Mar 2013 16:36:09 +0200
changeset 125757 5599909327628b33c730517784c8310960f5aa96
parent 125756 f9fb17feaa70aaccfff5f00ef992cfee3cc17721
child 125758 cf7db19041931f28468c7292fa2765d50397f075
push id24463
push userryanvm@gmail.com
push dateThu, 21 Mar 2013 20:45:33 +0000
treeherdermozilla-central@0e9badd3cf39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs633691
milestone22.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 633691 - Add automated test. r=jaws
browser/components/certerror/test/Makefile.in
browser/components/certerror/test/browser_bug633691.js
--- a/browser/components/certerror/test/Makefile.in
+++ b/browser/components/certerror/test/Makefile.in
@@ -8,13 +8,14 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = browser_bug431826.js \
+                 browser_bug633691.js \
     $(NULL)
 
 libs::	$(_BROWSER_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
new file mode 100644
--- /dev/null
+++ b/browser/components/certerror/test/browser_bug633691.js
@@ -0,0 +1,25 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+function test() {
+  waitForExplicitFinish();
+  gBrowser.selectedTab = gBrowser.addTab();
+  // Open a html page with about:certerror in an iframe
+  window.content.addEventListener("load", testIframeCert, true);
+  content.location = "data:text/html,<iframe width='700' height='700' src='about:certerror'></iframe>";
+}
+
+function testIframeCert() {
+  window.content.removeEventListener("load", testIframeCert, true);
+  // Confirm that the expert section is hidden
+  var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
+  var eC = doc.getElementById("expertContent");
+  ok(eC, "Expert content should exist")
+  ok(eC.hasAttribute("hidden"), "Expert content should be hidded by default");
+
+  // Clean up
+  gBrowser.removeCurrentTab();
+  
+  finish();
+}