summaryrefslogtreecommitdiffstats
path: root/dom/tests/reftest
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/tests/reftest
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/tests/reftest')
-rw-r--r--dom/tests/reftest/bug427779-ref.xml3
-rw-r--r--dom/tests/reftest/bug427779.xml4
-rw-r--r--dom/tests/reftest/bug439965-ref.html20
-rw-r--r--dom/tests/reftest/bug439965.html21
-rw-r--r--dom/tests/reftest/bug453105-ref.html7
-rw-r--r--dom/tests/reftest/bug453105.html9
-rw-r--r--dom/tests/reftest/bug456008-ref.html10
-rw-r--r--dom/tests/reftest/bug456008.xhtml11
-rw-r--r--dom/tests/reftest/bug559996-iframe.html7
-rw-r--r--dom/tests/reftest/bug559996-ref-iframe.html8
-rw-r--r--dom/tests/reftest/bug559996-ref.html16
-rw-r--r--dom/tests/reftest/bug559996.html16
-rw-r--r--dom/tests/reftest/bug591981-1.html32
-rw-r--r--dom/tests/reftest/bug591981-2.html32
-rw-r--r--dom/tests/reftest/bug591981-ref.html9
-rw-r--r--dom/tests/reftest/bug591981-script.js1
-rw-r--r--dom/tests/reftest/bug592366-1.html7
-rw-r--r--dom/tests/reftest/bug592366-1.xhtml6
-rw-r--r--dom/tests/reftest/bug592366-2.html7
-rw-r--r--dom/tests/reftest/bug592366-2.xhtml6
-rw-r--r--dom/tests/reftest/bug592366-ref.html9
-rw-r--r--dom/tests/reftest/bug592366-ref.xhtml9
-rw-r--r--dom/tests/reftest/bug798068-ref.xhtml19
-rw-r--r--dom/tests/reftest/bug798068.xhtml20
-rw-r--r--dom/tests/reftest/child592366-1.html19
-rw-r--r--dom/tests/reftest/child592366-1.xhtml18
-rw-r--r--dom/tests/reftest/child592366-2.html17
-rw-r--r--dom/tests/reftest/child592366-2.xhtml16
-rw-r--r--dom/tests/reftest/optiontext-ref.html8
-rw-r--r--dom/tests/reftest/optiontext.html8
-rw-r--r--dom/tests/reftest/reftest-stylo.list20
-rw-r--r--dom/tests/reftest/reftest.list13
-rw-r--r--dom/tests/reftest/script592366-2.js2
-rw-r--r--dom/tests/reftest/xml-stylesheet/css_relative_href.xml2
-rw-r--r--dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml2
-rw-r--r--dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml^headers^1
-rw-r--r--dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml2
-rw-r--r--dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml^headers^1
-rw-r--r--dom/tests/reftest/xml-stylesheet/embedded_dtd_id.svg20
-rw-r--r--dom/tests/reftest/xml-stylesheet/error_no_href.svg8
-rw-r--r--dom/tests/reftest/xml-stylesheet/fail.svg4
-rw-r--r--dom/tests/reftest/xml-stylesheet/failer.css1
-rw-r--r--dom/tests/reftest/xml-stylesheet/lreas_selflink_dtd_id.svg9
-rw-r--r--dom/tests/reftest/xml-stylesheet/lreas_selflink_empty_href.svg8
-rw-r--r--dom/tests/reftest/xml-stylesheet/lreas_selflink_relative_href.svg9
-rw-r--r--dom/tests/reftest/xml-stylesheet/pass.svg4
-rw-r--r--dom/tests/reftest/xml-stylesheet/passer.css1
-rw-r--r--dom/tests/reftest/xml-stylesheet/passer_override.css1
-rw-r--r--dom/tests/reftest/xml-stylesheet/reftest-stylo.list13
-rw-r--r--dom/tests/reftest/xml-stylesheet/reftest.list12
-rw-r--r--dom/tests/reftest/xml-stylesheet/svg_passer.xslt11
-rw-r--r--dom/tests/reftest/xml-stylesheet/xslt_relative_href.svg4
-rw-r--r--dom/tests/reftest/xml-stylesheet/xslt_selflink_dtd_id.xml11
-rw-r--r--dom/tests/reftest/xml-stylesheet/xslt_selflink_empty_href.xml10
-rw-r--r--dom/tests/reftest/xml-stylesheet/xslt_selflink_relative_href.xml11
55 files changed, 555 insertions, 0 deletions
diff --git a/dom/tests/reftest/bug427779-ref.xml b/dom/tests/reftest/bug427779-ref.xml
new file mode 100644
index 000000000..b3631c0d1
--- /dev/null
+++ b/dom/tests/reftest/bug427779-ref.xml
@@ -0,0 +1,3 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>This is a test</body>
+</html>
diff --git a/dom/tests/reftest/bug427779.xml b/dom/tests/reftest/bug427779.xml
new file mode 100644
index 000000000..59e7a36eb
--- /dev/null
+++ b/dom/tests/reftest/bug427779.xml
@@ -0,0 +1,4 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><base href="." /></head>
+<body>This is a test</body>
+</html>
diff --git a/dom/tests/reftest/bug439965-ref.html b/dom/tests/reftest/bug439965-ref.html
new file mode 100644
index 000000000..c3465c391
--- /dev/null
+++ b/dom/tests/reftest/bug439965-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script>
+function doe(aEl) {
+var doc = aEl.contentDocument;
+doc.designMode = 'on';
+
+try {
+doc.execCommand("insertHTML",false,'some text');
+} catch(e) {
+ document.getElementById('result').innerHTML = e;
+}
+}
+</script>
+
+<iframe onload="doe(this)"></iframe><br>
+<pre id="result" style="background-color: red; width: 300px; white-space: -moz-pre-wrap;"></pre>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug439965.html b/dom/tests/reftest/bug439965.html
new file mode 100644
index 000000000..da3f90ebe
--- /dev/null
+++ b/dom/tests/reftest/bug439965.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script>
+function doe(aEl) {
+aEl.style.display = '';
+var doc = aEl.contentDocument;
+doc.designMode = 'on';
+
+try {
+doc.execCommand("insertHTML",false,'some text');
+} catch(e) {
+ document.getElementById('result').innerHTML = e;
+}
+}
+</script>
+
+<iframe onload="doe(this)" style="display:none"></iframe><br>
+<pre id="result" style="background-color: red; width: 300px; white-space: -moz-pre-wrap;"></pre>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug453105-ref.html b/dom/tests/reftest/bug453105-ref.html
new file mode 100644
index 000000000..cc1095385
--- /dev/null
+++ b/dom/tests/reftest/bug453105-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<body>
+<form name="f">
+<select name="s">
+</select>
+</form>
+</body>
diff --git a/dom/tests/reftest/bug453105.html b/dom/tests/reftest/bug453105.html
new file mode 100644
index 000000000..0ace6d5a0
--- /dev/null
+++ b/dom/tests/reftest/bug453105.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<body onload="document.forms.f.s.options.length = 0;">
+<form name="f">
+<select name="s">
+<option name="o1">option 1</option>
+<option name="o2">option 2</option>
+</select>
+</form>
+</body>
diff --git a/dom/tests/reftest/bug456008-ref.html b/dom/tests/reftest/bug456008-ref.html
new file mode 100644
index 000000000..e605de531
--- /dev/null
+++ b/dom/tests/reftest/bug456008-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div id="target"></div>
+ <script>
+ document.getElementById("target").innerHTML =
+ "<object type='text/html' data='data:text/html,&lt;body bgcolor=&quot;green&quot;&gt;' width='300' height='200'></object>";
+ </script>
+ </body>
+</html>
diff --git a/dom/tests/reftest/bug456008.xhtml b/dom/tests/reftest/bug456008.xhtml
new file mode 100644
index 000000000..43027343c
--- /dev/null
+++ b/dom/tests/reftest/bug456008.xhtml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <div id="target"></div>
+ <script>
+ <![CDATA[
+ document.getElementById("target").innerHTML =
+ "<object type='text/html' data='data:text/html,&lt;body bgcolor=&quot;green&quot;&gt;' width='300' height='200'></object>";
+ ]]>
+ </script>
+ </body>
+</html>
diff --git a/dom/tests/reftest/bug559996-iframe.html b/dom/tests/reftest/bug559996-iframe.html
new file mode 100644
index 000000000..b576d1d22
--- /dev/null
+++ b/dom/tests/reftest/bug559996-iframe.html
@@ -0,0 +1,7 @@
+<html>
+<!-- This page is loaded in a 200px-square iframe scrolled to #down. -->
+<body>
+<div id="first" style="height: 150px; background: lightblue;">first</div>
+<div id="down" style="height: 250px; background: lightgreen;">second</div>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug559996-ref-iframe.html b/dom/tests/reftest/bug559996-ref-iframe.html
new file mode 100644
index 000000000..2b13b8b34
--- /dev/null
+++ b/dom/tests/reftest/bug559996-ref-iframe.html
@@ -0,0 +1,8 @@
+<html>
+<!-- This page is loaded in a 200px-square iframe scrolled to #down. -->
+<body>
+<div id="first" style="height: 150px; background: lightblue;">first</div>
+<div id="down" style="height: 250px; background: lightgreen;">second</div>
+<script>document.documentElement.offsetWidth;</script>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug559996-ref.html b/dom/tests/reftest/bug559996-ref.html
new file mode 100644
index 000000000..05178cbf8
--- /dev/null
+++ b/dom/tests/reftest/bug559996-ref.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<body>
+
+<iframe src="bug559996-ref-iframe.html#down" style="height: 200px; width: 200px"></iframe>
+<script>
+function endTest() {
+ document.documentElement.removeAttribute("class");
+}
+function waitForInactivity() {
+ setTimeout(endTest, 1000);
+}
+document.addEventListener("MozReftestInvalidate", waitForInactivity, false);
+</script>
+
+</body>
+</html>
diff --git a/dom/tests/reftest/bug559996.html b/dom/tests/reftest/bug559996.html
new file mode 100644
index 000000000..e6dda8df9
--- /dev/null
+++ b/dom/tests/reftest/bug559996.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<body>
+
+<iframe src="bug559996-iframe.html#down" style="height: 200px; width: 200px"></iframe>
+<script>
+function endTest() {
+ document.documentElement.removeAttribute("class");
+}
+function waitForInactivity() {
+ setTimeout(endTest, 1000);
+}
+document.addEventListener("MozReftestInvalidate", waitForInactivity, false);
+</script>
+
+</body>
+</html>
diff --git a/dom/tests/reftest/bug591981-1.html b/dom/tests/reftest/bug591981-1.html
new file mode 100644
index 000000000..5c48ca812
--- /dev/null
+++ b/dom/tests/reftest/bug591981-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Script-inserted script</title>
+</head>
+<body>
+<div></div>
+<script>
+function log(text) {
+ var p = document.createElement("p");
+ p.appendChild(document.createTextNode(text));
+ document.getElementsByTagName("div")[0].appendChild(p);
+}
+
+var head = document.getElementsByTagName("head")[0];
+
+var external = document.createElement("script");
+external.src = "bug591981-script.js";
+head.insertBefore(external, head.firstChild); // what jQuery does
+
+var internal = document.createElement("script");
+var data = "log('internal')";
+try {
+ internal.text = data;
+} catch(e) {
+ internal.appendChild(document.createTextNode(data));
+}
+head.insertBefore(internal, head.firstChild); // what jQuery does
+
+</script>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug591981-2.html b/dom/tests/reftest/bug591981-2.html
new file mode 100644
index 000000000..7d05d5179
--- /dev/null
+++ b/dom/tests/reftest/bug591981-2.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Script trying to execute parser-inserted non-executed scripts</title>
+</head>
+<body>
+<div></div>
+<script></script>
+<script></script>
+<script>
+function log(text) {
+ var p = document.createElement("p");
+ p.appendChild(document.createTextNode(text));
+ document.getElementsByTagName("div")[0].appendChild(p);
+}
+
+var head = document.getElementsByTagName("head")[0];
+
+var external = document.getElementsByTagName("script")[0];
+external.src = "bug591981-script.js";
+
+var internal = document.getElementsByTagName("script")[1];
+var data = "log('internal')";
+try {
+ internal.text = data;
+} catch(e) {
+ internal.appendChild(document.createTextNode(data));
+}
+
+</script>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug591981-ref.html b/dom/tests/reftest/bug591981-ref.html
new file mode 100644
index 000000000..8a19a40b9
--- /dev/null
+++ b/dom/tests/reftest/bug591981-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Script-inserted script</title>
+</head>
+<body>
+<div><p>internal</p><p>external</p></div>
+</body>
+</html>
diff --git a/dom/tests/reftest/bug591981-script.js b/dom/tests/reftest/bug591981-script.js
new file mode 100644
index 000000000..818596af3
--- /dev/null
+++ b/dom/tests/reftest/bug591981-script.js
@@ -0,0 +1 @@
+log("external");
diff --git a/dom/tests/reftest/bug592366-1.html b/dom/tests/reftest/bug592366-1.html
new file mode 100644
index 000000000..42e297154
--- /dev/null
+++ b/dom/tests/reftest/bug592366-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe src=child592366-1.html></iframe>After iframe
+</body></html>
diff --git a/dom/tests/reftest/bug592366-1.xhtml b/dom/tests/reftest/bug592366-1.xhtml
new file mode 100644
index 000000000..7f9f57b27
--- /dev/null
+++ b/dom/tests/reftest/bug592366-1.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe src="child592366-1.xhtml"></iframe>After iframe
+</body></html>
diff --git a/dom/tests/reftest/bug592366-2.html b/dom/tests/reftest/bug592366-2.html
new file mode 100644
index 000000000..42e297154
--- /dev/null
+++ b/dom/tests/reftest/bug592366-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe src=child592366-1.html></iframe>After iframe
+</body></html>
diff --git a/dom/tests/reftest/bug592366-2.xhtml b/dom/tests/reftest/bug592366-2.xhtml
new file mode 100644
index 000000000..db08a195a
--- /dev/null
+++ b/dom/tests/reftest/bug592366-2.xhtml
@@ -0,0 +1,6 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe src="child592366-1.html"></iframe>After iframe
+</body></html>
diff --git a/dom/tests/reftest/bug592366-ref.html b/dom/tests/reftest/bug592366-ref.html
new file mode 100644
index 000000000..7e1ee242c
--- /dev/null
+++ b/dom/tests/reftest/bug592366-ref.html
@@ -0,0 +1,9 @@
+<html><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe></iframe>After iframe
+<div><p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<p>Middle of Page</p>
+<p>End of Page</p>
+</div></body></html>
diff --git a/dom/tests/reftest/bug592366-ref.xhtml b/dom/tests/reftest/bug592366-ref.xhtml
new file mode 100644
index 000000000..a75444d69
--- /dev/null
+++ b/dom/tests/reftest/bug592366-ref.xhtml
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<title>Move node during parse</title>
+</head>
+<body>
+<iframe></iframe>After iframe
+<div><p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<p>Middle of Page</p>
+<p>End of Page</p>
+</div></body></html>
diff --git a/dom/tests/reftest/bug798068-ref.xhtml b/dom/tests/reftest/bug798068-ref.xhtml
new file mode 100644
index 000000000..2ddcd4a02
--- /dev/null
+++ b/dom/tests/reftest/bug798068-ref.xhtml
@@ -0,0 +1,19 @@
+<?xml version = '1.0' encoding = 'utf-8'?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <script>
+ function doTest() {
+ var Ci = Components.interfaces;
+ var defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom ={}, width = {}, height = {}, autoSize = {};
+ var windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
+ windowUtils.getViewportInfo(1, 1, defaultZoom, allowZoom, minZoom, maxZoom, width, height, autoSize);
+ document.getElementById("minZoom").innerHTML = minZoom.value.toPrecision(10);
+ document.getElementById("maxZoom").innerHTML = maxZoom.value.toPrecision(10);
+ }
+ </script>
+ </head>
+ <body onload="doTest();">
+ MinZoom: <span id="minZoom"></span><br />
+ MaxZoom: <span id="maxZoom"></span>
+ </body>
+</html>
diff --git a/dom/tests/reftest/bug798068.xhtml b/dom/tests/reftest/bug798068.xhtml
new file mode 100644
index 000000000..6e2a6a357
--- /dev/null
+++ b/dom/tests/reftest/bug798068.xhtml
@@ -0,0 +1,20 @@
+<?xml version = '1.0' encoding = 'utf-8'?>
+<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <script>
+ function doTest() {
+ var Ci = Components.interfaces;
+ var defaultZoom = {}, allowZoom = {}, minZoom = {}, maxZoom ={}, width = {}, height = {}, autoSize = {};
+ var windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
+ windowUtils.getViewportInfo(1, 1, defaultZoom, allowZoom, minZoom, maxZoom, width, height, autoSize);
+ document.getElementById("minZoom").innerHTML = minZoom.value.toPrecision(10);
+ document.getElementById("maxZoom").innerHTML = maxZoom.value.toPrecision(10);
+ }
+ </script>
+ </head>
+ <body onload="doTest();">
+ MinZoom: <span id="minZoom"></span><br />
+ MaxZoom: <span id="maxZoom"></span>
+ </body>
+</html>
diff --git a/dom/tests/reftest/child592366-1.html b/dom/tests/reftest/child592366-1.html
new file mode 100644
index 000000000..acd123571
--- /dev/null
+++ b/dom/tests/reftest/child592366-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Move node during parse</title>
+</head>
+<body>
+<div>
+<p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<script>
+parent.document.documentElement.lastChild.appendChild(document.getElementsByTagName("div")[0]);
+</script>
+<p>Middle of Page</p>
+<script>
+document.body.insertBefore(document.createTextNode("FAIL"), document.body.firstChild);
+</script>
+<p>End of Page</p>
+</div>
+</body>
+</html>
diff --git a/dom/tests/reftest/child592366-1.xhtml b/dom/tests/reftest/child592366-1.xhtml
new file mode 100644
index 000000000..0193e4cea
--- /dev/null
+++ b/dom/tests/reftest/child592366-1.xhtml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Move node during parse</title>
+</head>
+<body>
+<div>
+<p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<script>
+parent.document.documentElement.lastChild.appendChild(document.getElementsByTagName("div")[0]);
+</script>
+<p>Middle of Page</p>
+<script>
+document.body.insertBefore(document.createTextNode("FAIL"), document.body.firstChild);
+</script>
+<p>End of Page</p>
+</div>
+</body>
+</html>
diff --git a/dom/tests/reftest/child592366-2.html b/dom/tests/reftest/child592366-2.html
new file mode 100644
index 000000000..e2e6c3a65
--- /dev/null
+++ b/dom/tests/reftest/child592366-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Move node during parse</title>
+</head>
+<body>
+<div>
+<p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<script>
+parent.document.documentElement.lastChild.appendChild(document.getElementsByTagName("div")[0]);
+</script>
+<p>Middle of Page</p>
+<script src="script592366-2.js"></script>
+<p>End of Page</p>
+</div>
+</body>
+</html>
diff --git a/dom/tests/reftest/child592366-2.xhtml b/dom/tests/reftest/child592366-2.xhtml
new file mode 100644
index 000000000..a64dc83ae
--- /dev/null
+++ b/dom/tests/reftest/child592366-2.xhtml
@@ -0,0 +1,16 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Move node during parse</title>
+</head>
+<body>
+<div>
+<p>This text should not show inside the iframe. It should show inside the parent. Furthermore, there should be text saying "Middle of Page" and then "End of Page" below (also in the parent).</p>
+<script>
+parent.document.documentElement.lastChild.appendChild(document.getElementsByTagName("div")[0]);
+</script>
+<p>Middle of Page</p>
+<script src="script592366-2.js"></script>
+<p>End of Page</p>
+</div>
+</body>
+</html>
diff --git a/dom/tests/reftest/optiontext-ref.html b/dom/tests/reftest/optiontext-ref.html
new file mode 100644
index 000000000..6250c1fb2
--- /dev/null
+++ b/dom/tests/reftest/optiontext-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<body>
+<form name="f">
+<select name="s">
+<option name="o1">ok</option>
+</select>
+</form>
+</body>
diff --git a/dom/tests/reftest/optiontext.html b/dom/tests/reftest/optiontext.html
new file mode 100644
index 000000000..5297e6caa
--- /dev/null
+++ b/dom/tests/reftest/optiontext.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<body onload="document.forms.f.s.options[0].text = 'ok';">
+<form name="f">
+<select name="s">
+<option name="o1">-</option>
+</select>
+</form>
+</body>
diff --git a/dom/tests/reftest/reftest-stylo.list b/dom/tests/reftest/reftest-stylo.list
new file mode 100644
index 000000000..204efc507
--- /dev/null
+++ b/dom/tests/reftest/reftest-stylo.list
@@ -0,0 +1,20 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== bug453105.html bug453105.html
+== optiontext.html optiontext.html
+== bug456008.xhtml bug456008.xhtml
+fails fuzzy-if(skiaContent,2,3) == bug439965.html bug439965.html
+== bug427779.xml bug427779.xml
+fails skip-if(B2G||Mulet) fuzzy-if(skiaContent,1,5) == bug559996.html bug559996.html
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip == bug591981-1.html bug591981-1.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip == bug591981-2.html bug591981-2.html
+skip == bug592366-1.html bug592366-1.html
+skip == bug592366-2.html bug592366-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip == bug592366-1.xhtml bug592366-1.xhtml
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip == bug592366-2.xhtml bug592366-2.xhtml
+# Initial mulet triage: parity with B2G/B2G Desktop
+== bug798068.xhtml bug798068.xhtml
diff --git a/dom/tests/reftest/reftest.list b/dom/tests/reftest/reftest.list
new file mode 100644
index 000000000..cce31a6f6
--- /dev/null
+++ b/dom/tests/reftest/reftest.list
@@ -0,0 +1,13 @@
+== bug453105.html bug453105-ref.html
+== optiontext.html optiontext-ref.html
+== bug456008.xhtml bug456008-ref.html
+fuzzy-if(skiaContent,2,3) == bug439965.html bug439965-ref.html
+== bug427779.xml bug427779-ref.xml
+fuzzy-if(skiaContent,1,5) == bug559996.html bug559996-ref.html
+== bug591981-1.html bug591981-ref.html
+== bug591981-2.html bug591981-ref.html
+== bug592366-1.html bug592366-ref.html
+== bug592366-2.html bug592366-ref.html
+== bug592366-1.xhtml bug592366-ref.xhtml
+== bug592366-2.xhtml bug592366-ref.xhtml
+== bug798068.xhtml bug798068-ref.xhtml
diff --git a/dom/tests/reftest/script592366-2.js b/dom/tests/reftest/script592366-2.js
new file mode 100644
index 000000000..c3c8e143e
--- /dev/null
+++ b/dom/tests/reftest/script592366-2.js
@@ -0,0 +1,2 @@
+document.body.insertBefore(document.createTextNode("FAIL"), document.body.firstChild);
+
diff --git a/dom/tests/reftest/xml-stylesheet/css_relative_href.xml b/dom/tests/reftest/xml-stylesheet/css_relative_href.xml
new file mode 100644
index 000000000..8576e56d8
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/css_relative_href.xml
@@ -0,0 +1,2 @@
+<?xml-stylesheet type="text/css" href="passer.css"?>
+<element/>
diff --git a/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml
new file mode 100644
index 000000000..8576e56d8
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml
@@ -0,0 +1,2 @@
+<?xml-stylesheet type="text/css" href="passer.css"?>
+<element/>
diff --git a/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml^headers^ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml^headers^
new file mode 100644
index 000000000..581aae343
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external.xml^headers^
@@ -0,0 +1 @@
+Link: <failer.css>;rel="stylesheet";type="text/css"
diff --git a/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml
new file mode 100644
index 000000000..7859e6078
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml
@@ -0,0 +1,2 @@
+<?xml-stylesheet type="text/css" href="failer.css"?>
+<element/>
diff --git a/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml^headers^ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml^headers^
new file mode 100644
index 000000000..f9e96867b
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/css_relative_href_also_external_override.xml^headers^
@@ -0,0 +1 @@
+Link: <passer_override.css>;rel="stylesheet";type="text/css"
diff --git a/dom/tests/reftest/xml-stylesheet/embedded_dtd_id.svg b/dom/tests/reftest/xml-stylesheet/embedded_dtd_id.svg
new file mode 100644
index 000000000..dee0d44f0
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/embedded_dtd_id.svg
@@ -0,0 +1,20 @@
+<!DOCTYPE svg:svg [<!ATTLIST transform id ID #IMPLIED>]>
+<?xml-stylesheet type="application/xml" href="#transform"?>
+<svg:svg xmlns="http://www.w3.org/1999/XSL/Transform"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <svg:defs>
+ <transform id="transform" version="1.0">
+ <template match="node()|@*">
+ <copy>
+ <apply-templates select="@*"/>
+ <apply-templates/>
+ </copy>
+ </template>
+ <template match="svg:defs"/>
+ <template match="@fill">
+ <attribute name="fill">lime</attribute>
+ </template>
+ </transform>
+ </svg:defs>
+ <svg:rect width="100%" height="100%" fill="red"/>
+</svg:svg>
diff --git a/dom/tests/reftest/xml-stylesheet/error_no_href.svg b/dom/tests/reftest/xml-stylesheet/error_no_href.svg
new file mode 100644
index 000000000..63719f930
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/error_no_href.svg
@@ -0,0 +1,8 @@
+<?xml-stylesheet type="application/xml"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xslt:version="1.0">
+ <rect width="100%" height="100%" fill="lime">
+ <xslt:attribute name="fill">red</xslt:attribute>
+ </rect>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/fail.svg b/dom/tests/reftest/xml-stylesheet/fail.svg
new file mode 100644
index 000000000..fcffde523
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/fail.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <desc>Fail</desc>
+ <rect width="100%" height="100%" fill="red"/>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/failer.css b/dom/tests/reftest/xml-stylesheet/failer.css
new file mode 100644
index 000000000..08f46a7a8
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/failer.css
@@ -0,0 +1 @@
+:root { background: red; }
diff --git a/dom/tests/reftest/xml-stylesheet/lreas_selflink_dtd_id.svg b/dom/tests/reftest/xml-stylesheet/lreas_selflink_dtd_id.svg
new file mode 100644
index 000000000..8c05fc8b5
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/lreas_selflink_dtd_id.svg
@@ -0,0 +1,9 @@
+<!DOCTYPE svg [<!ATTLIST svg id ID #IMPLIED>]>
+<?xml-stylesheet type="application/xml" href="#transform"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ id="transform" xslt:version="1.0">
+ <rect width="100%" height="100%" fill="red">
+ <xslt:attribute name="fill">lime</xslt:attribute>
+ </rect>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/lreas_selflink_empty_href.svg b/dom/tests/reftest/xml-stylesheet/lreas_selflink_empty_href.svg
new file mode 100644
index 000000000..5a995697b
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/lreas_selflink_empty_href.svg
@@ -0,0 +1,8 @@
+<?xml-stylesheet type="application/xml" href=""?>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xslt:version="1.0">
+ <rect width="100%" height="100%" fill="red">
+ <xslt:attribute name="fill">lime</xslt:attribute>
+ </rect>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/lreas_selflink_relative_href.svg b/dom/tests/reftest/xml-stylesheet/lreas_selflink_relative_href.svg
new file mode 100644
index 000000000..e8d62584f
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/lreas_selflink_relative_href.svg
@@ -0,0 +1,9 @@
+<?xml-stylesheet type="application/xml"
+ href="lreas_selflink_relative_href.svg"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xslt:version="1.0">
+ <rect width="100%" height="100%" fill="red">
+ <xslt:attribute name="fill">lime</xslt:attribute>
+ </rect>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/pass.svg b/dom/tests/reftest/xml-stylesheet/pass.svg
new file mode 100644
index 000000000..65780d0f0
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/pass.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <desc>Pass</desc>
+ <rect width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/passer.css b/dom/tests/reftest/xml-stylesheet/passer.css
new file mode 100644
index 000000000..642b7cc10
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/passer.css
@@ -0,0 +1 @@
+:root { background: lime; }
diff --git a/dom/tests/reftest/xml-stylesheet/passer_override.css b/dom/tests/reftest/xml-stylesheet/passer_override.css
new file mode 100644
index 000000000..671e9e47b
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/passer_override.css
@@ -0,0 +1 @@
+:root { background: lime !important; }
diff --git a/dom/tests/reftest/xml-stylesheet/reftest-stylo.list b/dom/tests/reftest/xml-stylesheet/reftest-stylo.list
new file mode 100644
index 000000000..8d2e1e32d
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/reftest-stylo.list
@@ -0,0 +1,13 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== css_relative_href.xml css_relative_href.xml
+HTTP == css_relative_href_also_external.xml css_relative_href_also_external.xml
+HTTP == css_relative_href_also_external_override.xml css_relative_href_also_external_override.xml
+== embedded_dtd_id.svg embedded_dtd_id.svg
+== error_no_href.svg error_no_href.svg
+== lreas_selflink_dtd_id.svg lreas_selflink_dtd_id.svg
+== lreas_selflink_empty_href.svg lreas_selflink_empty_href.svg
+== lreas_selflink_relative_href.svg lreas_selflink_relative_href.svg
+== xslt_relative_href.svg xslt_relative_href.svg
+== xslt_selflink_dtd_id.xml xslt_selflink_dtd_id.xml
+== xslt_selflink_empty_href.xml xslt_selflink_empty_href.xml
+== xslt_selflink_relative_href.xml xslt_selflink_relative_href.xml
diff --git a/dom/tests/reftest/xml-stylesheet/reftest.list b/dom/tests/reftest/xml-stylesheet/reftest.list
new file mode 100644
index 000000000..1e485d8d8
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/reftest.list
@@ -0,0 +1,12 @@
+== css_relative_href.xml pass.svg
+HTTP == css_relative_href_also_external.xml pass.svg
+HTTP == css_relative_href_also_external_override.xml pass.svg
+== embedded_dtd_id.svg pass.svg
+!= error_no_href.svg fail.svg
+fails == lreas_selflink_dtd_id.svg pass.svg
+== lreas_selflink_empty_href.svg pass.svg
+== lreas_selflink_relative_href.svg pass.svg
+== xslt_relative_href.svg pass.svg
+== xslt_selflink_dtd_id.xml pass.svg
+== xslt_selflink_empty_href.xml pass.svg
+== xslt_selflink_relative_href.xml pass.svg
diff --git a/dom/tests/reftest/xml-stylesheet/svg_passer.xslt b/dom/tests/reftest/xml-stylesheet/svg_passer.xslt
new file mode 100644
index 000000000..392127cee
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/svg_passer.xslt
@@ -0,0 +1,11 @@
+<transform xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <template match="node()|@*">
+ <copy>
+ <apply-templates select="@*"/>
+ <apply-templates/>
+ </copy>
+ </template>
+ <template match="@fill">
+ <attribute name="fill">lime</attribute>
+ </template>
+</transform>
diff --git a/dom/tests/reftest/xml-stylesheet/xslt_relative_href.svg b/dom/tests/reftest/xml-stylesheet/xslt_relative_href.svg
new file mode 100644
index 000000000..33231847f
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/xslt_relative_href.svg
@@ -0,0 +1,4 @@
+<?xml-stylesheet type="application/xml" href="svg_passer.xslt"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect width="100%" height="100%" fill="red"/>
+</svg>
diff --git a/dom/tests/reftest/xml-stylesheet/xslt_selflink_dtd_id.xml b/dom/tests/reftest/xml-stylesheet/xslt_selflink_dtd_id.xml
new file mode 100644
index 000000000..626738b1b
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/xslt_selflink_dtd_id.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE xslt:transform [<!ATTLIST xslt:transform id ID #IMPLIED>]>
+<?xml-stylesheet type="application/xml" href="#transform"?>
+<xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/2000/svg"
+ id="transform" version="1.0">
+ <xslt:template match="/xslt:transform">
+ <svg>
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+ </xslt:template>
+</xslt:transform>
diff --git a/dom/tests/reftest/xml-stylesheet/xslt_selflink_empty_href.xml b/dom/tests/reftest/xml-stylesheet/xslt_selflink_empty_href.xml
new file mode 100644
index 000000000..9e0834b7e
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/xslt_selflink_empty_href.xml
@@ -0,0 +1,10 @@
+<?xml-stylesheet type="application/xml" href=""?>
+<xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0">
+ <xslt:template match="/xslt:transform">
+ <svg>
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+ </xslt:template>
+</xslt:transform>
diff --git a/dom/tests/reftest/xml-stylesheet/xslt_selflink_relative_href.xml b/dom/tests/reftest/xml-stylesheet/xslt_selflink_relative_href.xml
new file mode 100644
index 000000000..88d06a729
--- /dev/null
+++ b/dom/tests/reftest/xml-stylesheet/xslt_selflink_relative_href.xml
@@ -0,0 +1,11 @@
+<?xml-stylesheet type="application/xml"
+ href="xslt_selflink_relative_href.xml"?>
+<xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0">
+ <xslt:template match="/xslt:transform">
+ <svg>
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+ </xslt:template>
+</xslt:transform>