summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_bug419527.xhtml
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_bug419527.xhtml
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_bug419527.xhtml')
-rw-r--r--dom/base/test/test_bug419527.xhtml74
1 files changed, 74 insertions, 0 deletions
diff --git a/dom/base/test/test_bug419527.xhtml b/dom/base/test/test_bug419527.xhtml
new file mode 100644
index 000000000..c468af0ae
--- /dev/null
+++ b/dom/base/test/test_bug419527.xhtml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=419527
+-->
+<head>
+ <title>Test for Bug 419527</title>
+ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+ <bindings xmlns="http://www.mozilla.org/xbl"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <binding id="rangebinding">
+ <content><html:span>Foo</html:span>
+ </content>
+ <implementation>
+ <constructor>
+ var win = XPCNativeWrapper.unwrap(window);
+ var span = document.getAnonymousNodes(this)[0];
+ win.ok(span.localName == "span", "Wrong anon node!");
+ var range = document.createRange();
+ range.selectNode(span.firstChild);
+ win.ok(range.startContainer == span, "Wrong start container!");
+ win.ok(range.endContainer == span, "Wrong end container!");
+ var newSubTree = XPCNativeWrapper(win.newSubTree);
+ newSubTree.appendChild(this);
+ range.setStart(newSubTree.firstChild, 0);
+ win.ok(range.startContainer == newSubTree.firstChild,
+ "Range should have been collapsed to newSubTree.firstChild!");
+ win.ok(range.endContainer == newSubTree.firstChild,
+ "Range should have been collapsed to newSubTree.firstChild!");
+ //XXX This should just call SimpleTest.finish(), bugs 478528, 499735.
+ setTimeout(win.finish, 0);
+ </constructor>
+ </implementation>
+ </binding>
+ </bindings>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419527">Mozilla Bug 419527</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+<![CDATA[
+
+/** Test for Bug 419527 **/
+
+var d;
+
+function runRangeTest() {
+ window.newSubTree = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+ newSubTree.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "div"));
+
+ d = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+ d.style.MozBinding = "url('" + window.location + "#rangebinding" + "')";
+ document.body.appendChild(d);
+}
+
+function finish() {
+ SimpleTest.finish();
+}
+
+SimpleTest.waitForExplicitFinish();
+setTimeout(runRangeTest, 0);
+
+
+]]>
+</script>
+</pre>
+</body>
+</html>
+