Bug 829872 - Tests. r=bz
authorBobby Holley <bobbyholley@gmail.com>
Fri, 03 May 2013 14:47:09 -0700
changeset 141745 fb498cfb4058fd823396e693aeddd407deb0648b
parent 141744 70cfbdceb63a69446c81f4924c25c52ef8fbc753
child 141746 bfe5c0296c3b6b1fbe8536e658c4be19d9009f24
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs829872
milestone23.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 829872 - Tests. r=bz
js/xpconnect/tests/mochitest/Makefile.in
js/xpconnect/tests/mochitest/test_bug829872.html
--- a/js/xpconnect/tests/mochitest/Makefile.in
+++ b/js/xpconnect/tests/mochitest/Makefile.in
@@ -87,16 +87,17 @@ MOCHITEST_FILES =	chrome_wrappers_helper
 		file_bug795275.xml \
 		file_bug799348.html \
 		test_bug800864.html \
 		test_bug802557.html \
 		file_bug802557.html \
 		test_bug803730.html \
 		test_bug809547.html \
 		test_bug809674.html \
+		test_bug829872.html \
 		test_bug865260.html \
 		file_crosscompartment_weakmap.html \
 		test_crosscompartment_weakmap.html \
 		test_asmjs.html \
 		file_asmjs.js \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/mochitest/test_bug829872.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=829872
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 829872</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+
+  /** Test for Bug 829872 **/
+  SimpleTest.waitForExplicitFinish();
+
+  var gLoadCount = 0;
+  function loaded() {
+    if (++gLoadCount == 3)
+      go();
+  }
+
+
+  function go() {
+    ok(true, "Starting test");
+    is($('ifr').contentDocument, null, "null cross-origin contentDocument for iframe");
+    is($('obj').contentDocument, null, "null cross-origin contentDocument for obj");
+    is($('obj').getSVGDocument(), null, "null cross-origin getSVGDocument() for obj");
+    is($('framesetholder').contentDocument.getElementById('fr').contentDocument, null, "null cross-origin contentDocument for frame");
+    SimpleTest.finish();
+  }
+
+  </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829872">Mozilla Bug 829872</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+<iframe id="ifr" onload="loaded();" src="http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe>
+<object id="obj" onload="loaded();" data="http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></object>
+<iframe id="framesetholder" src="data:text/html,<html><head></head><frameset cols='100%'><frame id='fr' onload='parent.loaded();' src='http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html' /></frameset></html>"></iframe>
+</body>
+</html>