Bug 781476 - Test. r=me
authorBobby Holley <bobbyholley@gmail.com>
Thu, 16 Aug 2012 12:25:39 -0700
changeset 102559 7bd865cc52c5d496ac79b0cb165d4e1e995abe86
parent 102558 87fb202e726151e7bc9bdc18fc0d68bcc007d45f
child 102560 769750c602b2264ca176fee27c89eb999c40ab39
push id13525
push userbobbyholley@gmail.com
push dateThu, 16 Aug 2012 19:26:04 +0000
treeherdermozilla-inbound@7bd865cc52c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs781476
milestone17.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 781476 - Test. r=me
js/xpconnect/tests/mochitest/Makefile.in
js/xpconnect/tests/mochitest/file_bug781476.html
js/xpconnect/tests/mochitest/test_bug781476.html
--- a/js/xpconnect/tests/mochitest/Makefile.in
+++ b/js/xpconnect/tests/mochitest/Makefile.in
@@ -60,16 +60,18 @@ MOCHITEST_FILES =	bug500931_helper.html 
 		test_bug655297.html \
 		test_bug691059.html \
 		file_bug706301.html \
 		test_bug745483.html \
 		file_bug758563.html \
 		file_bug760131.html \
 		test_bug764389.html \
 		test_bug772288.html \
+		test_bug781476.html \
+		file_bug781476.html \
 		file_nodelists.html \
 		file_exnstack.html \
 		file_expandosharing.html \
 		file_empty.html \
 		file_documentdomain.html \
 		test_lookupMethod.html \
 		$(NULL)
 
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/mochitest/file_bug781476.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="application/javascript">
+function makeEvent() {
+  var evt = new Event("MouseEvents");
+  evt.expando = 42;
+  is(evt.expando, 42, "Expando properly visible in iframe");
+  return evt;
+}
+</script>
+</head>
+<body>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/mochitest/test_bug781476.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=781476
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 781476</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781476">Mozilla Bug 781476</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+<iframe onload="go();" id="ifr" src="file_bug781476.html"></iframe>
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 781476 **/
+SimpleTest.waitForExplicitFinish();
+
+function go() {
+  var iwin = document.getElementById('ifr').contentWindow;
+  iwin.is = is;
+  var evt = iwin.makeEvent();
+  is(evt.expando, 42, "Expando properly visible in caller frame");
+  SimpleTest.finish();
+}
+
+
+</script>
+</pre>
+</body>
+</html>