Add mochitest
authorjruderman@hmc.edu
Tue, 22 Apr 2008 22:40:56 -0700
changeset 14602 c7ebb454adda814aac881a6a98bfb1dd24d714f0
parent 14601 86f31a4e33dcd3da8a553880d0909ac589eb0a5d
child 14603 a45cf218d328b84238036cef48ca6167ff7da39c
push id14
push userbsmedberg@mozilla.com
push dateTue, 29 Apr 2008 14:30:10 +0000
treeherdermozilla-central@78e482f2d4be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9pre
Add mochitest
js/src/xpconnect/tests/mochitest/Makefile.in
js/src/xpconnect/tests/mochitest/test_bug361111.xul
--- a/js/src/xpconnect/tests/mochitest/Makefile.in
+++ b/js/src/xpconnect/tests/mochitest/Makefile.in
@@ -39,15 +39,16 @@ DEPTH		= ../../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = js/src/xpconnect/tests/mochitest
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
-_TEST_FILES =	test_bug390488.html \
+_TEST_FILES =	test_bug361111.xul \
+		test_bug390488.html \
 		test_bug393269.html \
 		test_wrappers.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/js/src/xpconnect/tests/mochitest/test_bug361111.xul
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=361111
+-->
+<window title="Mozilla Bug 361111"
+  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script type="application/javascript" src="/MochiKit/packed.js" />
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
+
+  <!-- test results are displayed in the html:body -->
+  <body xmlns="http://www.w3.org/1999/xhtml">
+  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=361111"
+     target="_blank">Mozilla Bug 361111</a>
+  </body>
+
+  <!-- test code goes here -->
+  <script type="application/javascript"><![CDATA[
+
+    /** Test for Bug 361111 **/
+    window.onerror = null;
+    SimpleTest.waitForExplicitFinish();
+    document.documentElement.setAttribute("onclick", "%");
+    is(1, 1, "Good, setting a bogus onclick did not throw.");
+    SimpleTest.finish();
+
+  ]]></script>
+</window>