summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/compat
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/compat')
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-currentColor.html19
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-001-ref.html6
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-001a.html9
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-001b.html9
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-001c.html9
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-001d.html9
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-002-ref.html25
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-002.html29
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-003-ref.html28
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-003.html35
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-004-ref.html34
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-004.html38
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html15
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html19
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-006-ref.html24
-rw-r--r--testing/web-platform/tests/compat/webkit-text-fill-color-property-006.html28
16 files changed, 336 insertions, 0 deletions
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-currentColor.html b/testing/web-platform/tests/compat/webkit-text-fill-color-currentColor.html
new file mode 100644
index 000000000..f4912c934
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-currentColor.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<title>Test that currentColor is not affected by -webkit-text-fill-color</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p id="target" style="text-decoration-color: currentColor; color: blue; -webkit-text-fill-color: red;"></p>
+<script>
+test(function() {
+ var target = document.getElementById("target");
+ var cs = window.getComputedStyle(target, null);
+
+ var textDecorationColor = cs.getPropertyValue('text-decoration-color');
+ var color = cs.getPropertyValue('color');
+ var webkiTextFillColor = cs.getPropertyValue('-webkit-text-fill-color');
+
+ assert_true(textDecorationColor == color);
+ assert_true(textDecorationColor != webkiTextFillColor);
+});
+
+</script> \ No newline at end of file
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-001-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001-ref.html
new file mode 100644
index 000000000..8d9b8cc22
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color: untouched</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<div style="color: green">These texts should be green</div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-001a.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001a.html
new file mode 100644
index 000000000..363f5608e
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001a.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color: green</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of texts should be green">
+<link rel="match" href="webkit-text-fill-color-property-001-ref.html">
+<div style="-webkit-text-fill-color: green;">These texts should be green</div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-001b.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001b.html
new file mode 100644
index 000000000..3b9a68cf7
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001b.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color: green</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of texts should be green">
+<link rel="match" href="webkit-text-fill-color-property-001-ref.html">
+<div style="color: red; -webkit-text-fill-color: green;">These texts should be green</div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-001c.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001c.html
new file mode 100644
index 000000000..54d600762
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001c.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color: green</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of texts should be green">
+<link rel="match" href="webkit-text-fill-color-property-001-ref.html">
+<div style="color: red; -webkit-text-fill-color: green;">These texts <span style="color: red">should be green</span></div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-001d.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001d.html
new file mode 100644
index 000000000..a38653944
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-001d.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color: green</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of texts should be green">
+<link rel="match" href="webkit-text-fill-color-property-001-ref.html">
+<div style="color: transparent; -webkit-text-fill-color: green;">These texts should be green</div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-002-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-002-ref.html
new file mode 100644
index 000000000..00c5072f8
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-002-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>webkit-text-fill-color on selected text reference</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+p {
+ color: green;
+}
+</style>
+<body onload="onload()">
+<p>Pass if color of <span id="selectMe">selected text</span> is green or inverted (depending on the platform convention), but not red</p>
+<script type="text/javascript">
+function onload() {
+ var elt = document.getElementById("selectMe");
+ var range = document.createRange();
+ range.selectNode(elt);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-002.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-002.html
new file mode 100644
index 000000000..8ed14ccc8
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-002.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>webkit-text-fill-color should take effect while rendering selected text</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of selected text should be green">
+<link rel="match" href="webkit-text-fill-color-property-002-ref.html">
+<style>
+p {
+ color: red;
+ -webkit-text-fill-color: green;
+}
+</style>
+<body onload="onload()">
+<p>Pass if color of <span id="selectMe">selected text</span> is green or inverted (depending on the platform convention), but not red</p>
+<script type="text/javascript">
+function onload() {
+ var elt = document.getElementById("selectMe");
+ var range = document.createRange();
+ range.selectNode(elt);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-003-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-003-ref.html
new file mode 100644
index 000000000..bbfd78e37
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-003-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>webkit-text-fill-color on ::-moz-selection selected text reference</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+::-moz-selection {
+ color: green; background: skyblue;
+}
+::selection {
+ color: green; background: skyblue;
+}
+</style>
+<body onload="onload()">
+<p>Pass if color of <span id="selectMe">selected text</span> is green!!!</p>
+<script type="text/javascript">
+function onload() {
+ var elt = document.getElementById("selectMe");
+ var range = document.createRange();
+ range.selectNode(elt);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-003.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-003.html
new file mode 100644
index 000000000..dcbd70b18
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-003.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<title>webkit-text-fill-color should take effect while rendering ::-moz-selection selected text</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of selected text should be green">
+<link rel="match" href="webkit-text-fill-color-property-003-ref.html">
+<style>
+::-moz-selection {
+ background: skyblue;
+ color: red;
+ -webkit-text-fill-color: green;
+}
+::selection {
+ background: skyblue;
+ color: red;
+ -webkit-text-fill-color: green;
+}
+</style>
+<body onload="onload()">
+<p>Pass if color of <span id="selectMe">selected text</span> is green!!!</p>
+<script type="text/javascript">
+function onload() {
+ var elt = document.getElementById("selectMe");
+ var range = document.createRange();
+ range.selectNode(elt);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-004-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-004-ref.html
new file mode 100644
index 000000000..583cf9a35
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-004-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color on MathML reference</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+math {
+ font-size: 50px;
+ color: green;
+}
+</style>
+<body>
+<p>Pass if color of operators and operands are all green!!!</p>
+ <math>
+ <mrow>
+ <mrow>
+ <msup>
+ <mi>a</mi>
+ <mn>2</mn>
+ </msup>
+ <mo>+</mo>
+ <msup>
+ <mi>b</mi>
+ <mn>2</mn>
+ </msup>
+ </mrow>
+ <mo>=</mo>
+ <msup>
+ <mi>c</mi>
+ <mn>2</mn>
+ </msup>
+ </mrow>
+ </math>
+</body>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-004.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-004.html
new file mode 100644
index 000000000..739418d98
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-004.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color should take effect while rendering MathML</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of MathML should be green">
+<link rel="match" href="webkit-text-fill-color-property-004-ref.html">
+<style>
+math {
+ font-size: 50px;
+ color: red;
+ -webkit-text-fill-color: green;
+}
+</style>
+<body>
+<p>Pass if color of operators and operands are all green!!!</p>
+ <math>
+ <mrow>
+ <mrow>
+ <msup>
+ <mi>a</mi>
+ <mn>2</mn>
+ </msup>
+ <mo>+</mo>
+ <msup>
+ <mi>b</mi>
+ <mn>2</mn>
+ </msup>
+ </mrow>
+ <mo>=</mo>
+ <msup>
+ <mi>c</mi>
+ <mn>2</mn>
+ </msup>
+ </mrow>
+ </math>
+</body>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html
new file mode 100644
index 000000000..1391e38c1
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color on text-decoration underline reference</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style type="text/css">
+p {
+ color: green;
+}
+p.underline {
+ text-decoration: underline;
+}
+</style>
+<div><p>Pass if text underline is green!!!</p></div>
+<div><p class="underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p></div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html
new file mode 100644
index 000000000..88ac17a81
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color should not take effect while rendering text-decoration underline</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of text-decoration underline should be green">
+<link rel="match" href="webkit-text-fill-color-property-005-ref.html">
+<style type="text/css">
+p {
+ color: green;
+}
+p.underline {
+ text-decoration: underline;
+ -webkit-text-fill-color: red
+}
+</style>
+<div><p>Pass if text underline is green!!!</p></div>
+<div><p class="underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p></div>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-006-ref.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-006-ref.html
new file mode 100644
index 000000000..602d296bd
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-006-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color on text-overflow ellipsis reference</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+div {
+ font-size: 10px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 150px;
+ color: green;
+}
+span {
+ font-family: Ahem;
+ font-size: 30px;
+}
+</style>
+<body>
+<p>Test passes if there is a <strong>green ellipsis</strong> after "TestChecks".</p>
+<div>
+ <span>TestChecksThatTextColorAndEllipsisColorShouldBeTheSame</span>
+</div>
+</body>
diff --git a/testing/web-platform/tests/compat/webkit-text-fill-color-property-006.html b/testing/web-platform/tests/compat/webkit-text-fill-color-property-006.html
new file mode 100644
index 000000000..4eb37e9e9
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-006.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color should take effect while rendering text-overflow ellipsis</title>
+<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-fill-color">
+<meta name="assert" content="The color of text-overflow ellipsis should be green">
+<link rel="match" href="webkit-text-fill-color-property-006-ref.html">
+<style>
+div {
+ font-size: 10px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 150px;
+ color: red;
+ -webkit-text-fill-color: green;
+}
+span {
+ font-family: Ahem;
+ font-size: 30px;
+}
+</style>
+<body>
+<p>Test passes if there is a <strong>green ellipsis</strong> after "TestChecks".</p>
+<div>
+ <span>TestChecksThatTextColorAndEllipsisColorShouldBeTheSame</span>
+</div>
+</body>