summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_bug895974.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/base/test/test_bug895974.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/base/test/test_bug895974.html')
-rw-r--r--dom/base/test/test_bug895974.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/dom/base/test/test_bug895974.html b/dom/base/test/test_bug895974.html
new file mode 100644
index 000000000..25499d5a2
--- /dev/null
+++ b/dom/base/test/test_bug895974.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=895974
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 895974</title>
+ <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+
+ /** Test for Bug 895974 **/
+ SimpleTest.waitForExplicitFinish();
+
+ addLoadEvent(function() {
+ var frag = document.createDocumentFragment();
+ var span = document.createElement("span");
+ var div = document.createElement("div");
+ var text = document.createTextNode("help");
+ frag.appendChild(document.createTextNode("fail"));
+ frag.appendChild(span);
+ frag.appendChild(text);
+ frag.appendChild(div);
+ frag.appendChild(document.createTextNode("fail"));
+
+ is(text.nextElementSibling, div, "nextElementSibling should work on text");
+ is(text.previousElementSibling, span,
+ "previousElementSibling should work on text");
+
+ is(document.firstElementChild, document.documentElement,
+ "firstElementChild should work on document");
+ is(document.lastElementChild, document.documentElement,
+ "lastElementChild should work on document");
+ is(document.children.length, 1, "Document has one element kid");
+ is(document.children[0], document.documentElement,
+ "Document only element child is <html>");
+
+ is(frag.firstElementChild, span,
+ "firstElementChild should work on document fragment");
+ is(frag.lastElementChild, div,
+ "lastElementChild should work on document fragment");
+ is(frag.children.length, 2, "Document fragment has two element kids");
+ is(frag.children[0], span, "Document fragment first element child is span");
+ is(frag.children[1], div, "Document fragment second element child is div");
+
+ is(document.documentElement.firstElementChild, document.head,
+ "firstElementChild should work on element");
+ is(document.documentElement.lastElementChild, document.body,
+ "lastElementChild should work on element");
+ is(document.documentElement.children.length, 2, "<html> has two element kids");
+ is(document.documentElement.children[0], document.head,
+ "<html> first element child is head");
+ is(document.documentElement.children[1], document.body,
+ "<html> second element child is body");
+ SimpleTest.finish();
+ });
+ </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=895974">Mozilla Bug 895974</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>