Test for bug 563322 part 2 - Avoid calling nsScriptLoader::SetEnabled in the innerHTML setter when using the XML parser. r=Olli.Pettay.
authorHenri Sivonen <hsivonen@iki.fi>
Mon, 01 Aug 2011 10:48:28 +0300
changeset 73606 1e3cf346898c66ca0149f7ceedb88d85d27d95ee
parent 73605 ff515cbd864e1c8d7db9c9ffe6af27a92c9e607e
child 73607 a228ff77a9f82df058eb760f47ceca9cbcb58d27
push id20896
push usermak77@bonardo.net
push dateMon, 01 Aug 2011 14:04:43 +0000
treeherdermozilla-central@345ba237404d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersOlli
bugs563322
milestone8.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
Test for bug 563322 part 2 - Avoid calling nsScriptLoader::SetEnabled in the innerHTML setter when using the XML parser. r=Olli.Pettay.
parser/htmlparser/tests/mochitest/Makefile.in
parser/htmlparser/tests/mochitest/test_bug563322.xhtml
--- a/parser/htmlparser/tests/mochitest/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/Makefile.in
@@ -67,16 +67,17 @@ include $(topsrcdir)/config/rules.mk
 		file_bug543062.sjs \
 		test_bug552938.html \
 		test_bug552938-2.html \
 		test_bug566879.html \
 		test_compatmode.html \
 		invalidchar.xml \
 		file_bug534293.sjs \
 		file_bug534293-slow.sjs \
+		test_bug563322.xhtml \
 		test_bug594730.html \
 		file_bug594730-1.html \
 		file_bug594730-2.html \
 		file_bug594730-3.html \
 		file_bug594730-4.html \
 		file_bug594730-5.html \
 		file_bug594730-6.html \
 		file_bug594730-7.html \
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/mochitest/test_bug563322.xhtml
@@ -0,0 +1,34 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=563322
+-->
+<head>
+  <title>Test for Bug 563322</title>
+  <script type="application/javascript" src="/MochiKit/packed.js"></script>
+  <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=563322">Mozilla Bug 563322</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+<![CDATA[
+
+/** Test for Bug 563322 **/
+
+var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+div.innerHTML = "<script>ok(false, 'Script ran but should not have')</script><script>ok(false, 'Script ran but should not have')</script>"
+
+document.getElementById("content").appendChild(div);
+
+ok(true, "Keep the harness happy");
+
+]]>
+</script>
+</pre>
+</body>
+</html>