summaryrefslogtreecommitdiffstats
path: root/layout/reftests/cssom
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 /layout/reftests/cssom
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 'layout/reftests/cssom')
-rw-r--r--layout/reftests/cssom/computed-style-cross-window-inner.html6
-rw-r--r--layout/reftests/cssom/computed-style-cross-window-ref.html75
-rw-r--r--layout/reftests/cssom/computed-style-cross-window.html78
-rw-r--r--layout/reftests/cssom/inline-style-null-ref.html7
-rw-r--r--layout/reftests/cssom/inline-style-null.html13
-rw-r--r--layout/reftests/cssom/reftest-stylo.list5
-rw-r--r--layout/reftests/cssom/reftest.list2
7 files changed, 186 insertions, 0 deletions
diff --git a/layout/reftests/cssom/computed-style-cross-window-inner.html b/layout/reftests/cssom/computed-style-cross-window-inner.html
new file mode 100644
index 000000000..370ed9bd5
--- /dev/null
+++ b/layout/reftests/cssom/computed-style-cross-window-inner.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<style>
+p { color: fuchsia }
+</style>
+<p>This is a paragraph inside the iframe.</p>
+<div style="display:none"><p>This is a paragraph inside the iframe.</p></div>
diff --git a/layout/reftests/cssom/computed-style-cross-window-ref.html b/layout/reftests/cssom/computed-style-cross-window-ref.html
new file mode 100644
index 000000000..01724fefb
--- /dev/null
+++ b/layout/reftests/cssom/computed-style-cross-window-ref.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML>
+<title>getComputedStyle across windows</title>
+<style>
+p { color: blue }
+
+div { margin: 1em 0 }
+</style>
+
+<script>
+
+var gRunCount = 2;
+
+function run() {
+ if (--gRunCount != 0)
+ return;
+
+ var i = document.getElementById("i");
+
+ var pout = document.getElementById("out");
+ var poutnone = document.getElementById("outnone");
+ var poutdet = document.createElement("p");
+ var pin = i.contentDocument.getElementsByTagName("p")[0];
+ var pinnone = i.contentDocument.getElementsByTagName("p")[1];
+ var pindet = i.contentDocument.createElement("p");
+
+ document.getElementById("res1").style.color =
+ window.getComputedStyle(pin, "").color;
+
+ document.getElementById("res2").style.color =
+ i.contentWindow.getComputedStyle(pout, "").color;
+
+ document.getElementById("res3").style.color =
+ window.getComputedStyle(pinnone, "").color;
+
+ document.getElementById("res4").style.color =
+ i.contentWindow.getComputedStyle(poutnone, "").color;
+
+ document.getElementById("res5").style.color =
+ window.getComputedStyle(pindet, "").color;
+
+ document.getElementById("res6").style.color =
+ i.contentWindow.getComputedStyle(poutdet, "").color;
+}
+
+</script>
+<body onload="run()">
+
+<p id="out">This is a paragraph outside the iframe.</p>
+<div style="display:none"><p id="outnone">This is a paragraph outside the iframe.</p></div>
+
+<iframe id="i" src="computed-style-cross-window-inner.html" onload="run()"></iframe>
+
+<div style="color:fuchsia">This paragraph is the color that
+outerWindow.getComputedStyle says the paragraph inside the iframe
+is.</div>
+
+<div style="color:blue">This paragraph is the color that
+iframeWindow.getComputedStyle says the paragraph outside the iframe
+is.</div>
+
+<div style="color:fuchsia">This paragraph is the color that
+outerWindow.getComputedStyle says the display:none paragraph inside the
+iframe is.</div>
+
+<div style="color:blue">This paragraph is the color that
+iframeWindow.getComputedStyle says the display:none paragraph outside
+the iframe is.</div>
+
+<div style="color:blue">This paragraph is the color that
+outerWindow.getComputedStyle says the detached paragraph inside the
+iframe is.</div>
+
+<div style="color:fuchsia">This paragraph is the color that
+iframeWindow.getComputedStyle says the detached paragraph outside
+the iframe is.</div>
diff --git a/layout/reftests/cssom/computed-style-cross-window.html b/layout/reftests/cssom/computed-style-cross-window.html
new file mode 100644
index 000000000..464e0f9b7
--- /dev/null
+++ b/layout/reftests/cssom/computed-style-cross-window.html
@@ -0,0 +1,78 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<title>getComputedStyle across windows</title>
+<style>
+p { color: blue }
+
+div { margin: 1em 0 }
+</style>
+
+<script>
+
+var gRunCount = 2;
+
+function run() {
+ if (--gRunCount != 0)
+ return;
+
+ var i = document.getElementById("i");
+
+ var pout = document.getElementById("out");
+ var poutnone = document.getElementById("outnone");
+ var poutdet = document.createElement("p");
+ var pin = i.contentDocument.getElementsByTagName("p")[0];
+ var pinnone = i.contentDocument.getElementsByTagName("p")[1];
+ var pindet = i.contentDocument.createElement("p");
+
+ document.getElementById("res1").style.color =
+ window.getComputedStyle(pin, "").color;
+
+ document.getElementById("res2").style.color =
+ i.contentWindow.getComputedStyle(pout, "").color;
+
+ document.getElementById("res3").style.color =
+ window.getComputedStyle(pinnone, "").color;
+
+ document.getElementById("res4").style.color =
+ i.contentWindow.getComputedStyle(poutnone, "").color;
+
+ document.getElementById("res5").style.color =
+ window.getComputedStyle(pindet, "").color;
+
+ document.getElementById("res6").style.color =
+ i.contentWindow.getComputedStyle(poutdet, "").color;
+
+ document.documentElement.removeAttribute("class");
+}
+
+</script>
+<body onload="run()">
+
+<p id="out">This is a paragraph outside the iframe.</p>
+<div style="display:none"><p id="outnone">This is a paragraph outside the iframe.</p></div>
+
+<iframe id="i" src="computed-style-cross-window-inner.html" onload="run()"></iframe>
+
+<div id="res1">This paragraph is the color that
+outerWindow.getComputedStyle says the paragraph inside the iframe
+is.</div>
+
+<div id="res2">This paragraph is the color that
+iframeWindow.getComputedStyle says the paragraph outside the iframe
+is.</div>
+
+<div id="res3">This paragraph is the color that
+outerWindow.getComputedStyle says the display:none paragraph inside the
+iframe is.</div>
+
+<div id="res4">This paragraph is the color that
+iframeWindow.getComputedStyle says the display:none paragraph outside
+the iframe is.</div>
+
+<div id="res5">This paragraph is the color that
+outerWindow.getComputedStyle says the detached paragraph inside the
+iframe is.</div>
+
+<div id="res6">This paragraph is the color that
+iframeWindow.getComputedStyle says the detached paragraph outside
+the iframe is.</div>
diff --git a/layout/reftests/cssom/inline-style-null-ref.html b/layout/reftests/cssom/inline-style-null-ref.html
new file mode 100644
index 000000000..90a8a0618
--- /dev/null
+++ b/layout/reftests/cssom/inline-style-null-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+ div { color: green; }
+</style>
+<div>This text should be green</div>
+<div>This text should be green</div>
+<div>This text should be green</div>
diff --git a/layout/reftests/cssom/inline-style-null.html b/layout/reftests/cssom/inline-style-null.html
new file mode 100644
index 000000000..4d3c36686
--- /dev/null
+++ b/layout/reftests/cssom/inline-style-null.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<style>
+ div { color: green; }
+ div#reverse { color: red; }
+</style>
+<div id="null" style="color: red">This text should be green</div>
+<div id="emptystring"style="color: red">This text should be green</div>
+<div id="reverse" style="color: green">This text should be green</div>
+<script>
+ document.getElementById("null").style.color = null;
+ document.getElementById("emptystring").style.color = "";
+ document.getElementById("reverse").style.color = "some invalid color string";
+</script>
diff --git a/layout/reftests/cssom/reftest-stylo.list b/layout/reftests/cssom/reftest-stylo.list
new file mode 100644
index 000000000..0677cddf6
--- /dev/null
+++ b/layout/reftests/cssom/reftest-stylo.list
@@ -0,0 +1,5 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+fails skip-if(B2G||Mulet) fuzzy-if(skiaContent,2,5) == computed-style-cross-window.html computed-style-cross-window.html
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+== inline-style-null.html inline-style-null.html
diff --git a/layout/reftests/cssom/reftest.list b/layout/reftests/cssom/reftest.list
new file mode 100644
index 000000000..9059acbff
--- /dev/null
+++ b/layout/reftests/cssom/reftest.list
@@ -0,0 +1,2 @@
+fuzzy-if(skiaContent,2,5) == computed-style-cross-window.html computed-style-cross-window-ref.html
+== inline-style-null.html inline-style-null-ref.html