Bug 590771 - Tests. r=sicking a=tests
authorMounir Lamouri <mounir.lamouri@gmail.com>
Wed, 29 Dec 2010 11:54:51 +0100
changeset 34842 9e561d402701
parent 34841 a2ae8b0e65ee
child 34843 ffa1ef8ab52b
push id1747
push usermlamouri@mozilla.com
push date2010-12-29 12:11 +0000
reviewerssicking, tests
bugs590771
milestone1.9.2.14pre
Bug 590771 - Tests. r=sicking a=tests
content/base/test/Makefile.in
content/base/test/test_bug590771.html
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -337,16 +337,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug545644.html \
 		test_bug545644.xhtml \
 		test_bug541937.html \
 		file_bug541937.html \
 		file_bug541937.xhtml \
 		test_x-frame-options.html \
 		file_x-frame-options_main.html \
 		file_x-frame-options_page.sjs \
+		test_bug590771.html \
 		$(NULL)
 # Disabled; see bug 492181
 #		test_plugin_freezing.html
 
 # Disabled for now. Mochitest isn't reliable enough for these.
 # test_bug444546.html \
 # bug444546.sjs \
 
new file mode 100644
--- /dev/null
+++ b/content/base/test/test_bug590771.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=590771
+-->
+<head>
+  <title>Test for Bug 590771</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=590771">Mozilla Bug 590771</a>
+<p id="display"></p>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 590771 **/
+
+var attr = document.createAttribute("foo");
+attr.value = "bar";
+var ni = document.createNodeIterator(attr, -1, null, false);
+ni.nextNode();
+ni.nextNode();
+is(ni.referenceNode, attr.firstChild,
+   "iterator should be on the first child attribute");
+
+attr.removeChild(attr.firstChild);
+is(ni.referenceNode, attr,
+   "iterator should be on the attribute now");
+
+</script>
+</pre>
+</body>
+</html>