Bug 1261578 - Part 5. web-platform-test reftest; draft
authorCJKu <cku@mozilla.com>
Tue, 19 Apr 2016 17:10:29 +0800
changeset 353646 015ff855f080c346dec8b32ddacfd4bc1f5d1a2d
parent 353645 0b8e17c7f2f595263f6f205436fe384a49395c4b
child 353647 e2f007ef78b36dfaeb3512159f38910efde5101c
push id15889
push usercku@mozilla.com
push dateTue, 19 Apr 2016 09:15:12 +0000
bugs1261578
milestone48.0a1
Bug 1261578 - Part 5. web-platform-test reftest; MozReview-Commit-ID: CqWnikRMwFm
testing/web-platform/meta/compat/webkit-text-fill-color-property-002.html.ini
testing/web-platform/meta/compat/webkit-text-fill-color-property-003.html.ini
testing/web-platform/meta/compat/webkit-text-fill-color-property-004.html.ini
testing/web-platform/meta/compat/webkit-text-fill-color-property-005.html.ini
testing/web-platform/meta/compat/webkit-text-fill-color-property-006.html.ini
testing/web-platform/tests/compat/webkit-text-fill-color-property-002-ref.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-002.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-003-ref.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-003.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-004-ref.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-004.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-006-ref.html
testing/web-platform/tests/compat/webkit-text-fill-color-property-006.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/compat/webkit-text-fill-color-property-002.html.ini
@@ -0,0 +1,3 @@
+[webkit-text-fill-color-property-002.html]
+  type: reftest
+  prefs: [layout.css.prefixes.webkit:true]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/compat/webkit-text-fill-color-property-003.html.ini
@@ -0,0 +1,3 @@
+[webkit-text-fill-color-property-003.html]
+  type: reftest
+  prefs: [layout.css.prefixes.webkit:true]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/compat/webkit-text-fill-color-property-004.html.ini
@@ -0,0 +1,3 @@
+[webkit-text-fill-color-property-004.html]
+  type: reftest
+  prefs: [layout.css.prefixes.webkit:true]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/compat/webkit-text-fill-color-property-005.html.ini
@@ -0,0 +1,3 @@
+[webkit-text-fill-color-property-005.html]
+  type: reftest
+  prefs: [layout.css.prefixes.webkit:true]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/compat/webkit-text-fill-color-property-006.html.ini
@@ -0,0 +1,3 @@
+[webkit-text-fill-color-property-006.html]
+  type: reftest
+  prefs: [layout.css.prefixes.webkit:true]
new file mode 100644
--- /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>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005-ref.html
@@ -0,0 +1,13 @@
+<!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 {
+  font-size: 50px;
+  text-decoration: underline;
+  color: green;
+}
+</style>
+<div><p>Pass if text underline is green!!!</p></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/compat/webkit-text-fill-color-property-005.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>webkit-text-fill-color should 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 {
+  font-size: 50px;
+  text-decoration: underline;
+  color: red;
+  -webkit-text-fill-color: green;
+}
+</style>
+<div><p>Pass if text underline is green!!!</p></div>
new file mode 100644
--- /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>
new file mode 100644
--- /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>