Bug 781476 - Test. r=me a=lsblakk
authorBobby Holley <bobbyholley@gmail.com>
Tue, 21 Aug 2012 10:52:35 -0700
changeset 102454 cdcde4d200d49f026c622a87da5a131ecb81ecee
parent 102453 ab5ca4c67ba1709176e18f37c92a0144f9024ba2
child 102455 0112ad558432dc6b8bd7acee3e22f4a619eaa5db
push id1942
push userbobbyholley@gmail.com
push dateTue, 21 Aug 2012 18:20:16 +0000
treeherdermozilla-aurora@0112ad558432 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, lsblakk
bugs781476
milestone16.0a2
Bug 781476 - Test. r=me a=lsblakk
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
@@ -61,16 +61,18 @@ MOCHITEST_FILES =	bug500931_helper.html 
 		file_bug658560.html \
 		test_bug655297.html \
 		test_bug691059.html \
 		test_bug745483.html \
 		file_bug758563.html \
 		test_bug764389.html \
 		file_nodelists.html \
 		file_bug706301.html \
+		test_bug781476.html \
+		file_bug781476.html \
 		file_exnstack.html \
 		file_expandosharing.html \
 		file_bug760131.html \
 		file_empty.html \
 		file_documentdomain.html \
 		$(NULL)
 
 MOCHITEST_CHROME_FILES	= \
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>