Bug 1467621 - P2: Reftests for {box,text}-shadow with currentcolor. r?xidorn draft
authorDan Glastonbury <dan.glastonbury@gmail.com>
Tue, 19 Jun 2018 14:35:15 +1000
changeset 809473 fd29b363694cbe14838e605bf058d865412773fa
parent 809472 7b4baf650ca82faa5a2043505e67389814ececdb
child 809474 454fa24f3a805a3db32218ec2689e2078b10374d
push id113689
push userbmo:dglastonbury@mozilla.com
push dateFri, 22 Jun 2018 06:15:24 +0000
reviewersxidorn
bugs1467621
milestone62.0a1
Bug 1467621 - P2: Reftests for {box,text}-shadow with currentcolor. r?xidorn MozReview-Commit-ID: Ak6qWFetz5d
layout/reftests/w3c-css/submitted/background/box-shadow-currentcolor-ref.html
layout/reftests/w3c-css/submitted/background/box-shadow-currentcolor.html
layout/reftests/w3c-css/submitted/background/reftest.list
layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
layout/reftests/w3c-css/submitted/text-decor-3/text-shadow-currentcolor-ref.html
layout/reftests/w3c-css/submitted/text-decor-3/text-shadow-currentcolor.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/background/box-shadow-currentcolor-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Reftest Reference</title>
+    <link rel="author" title="Dan Glastonbury" href="mailto:dglastonbury@mozilla.com" />
+    <style type="text/css">
+     div {
+         padding: 40px;
+     }
+
+     p {
+         padding: 2em;
+         border: 1px solid limegreen;
+         box-shadow: 10px 5px 5px limegreen;
+     }
+    </style>
+  </head>
+  <body>
+    <!-- content of test -->
+    <div>
+      <p style="color: limegreen">
+          This box should have a green box shadow.
+      </p>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/background/box-shadow-currentcolor.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Test: 'box-shadow' respects 'currentcolor'</title>
+    <link rel="author" title="Dan Glastonbury" href="mailto:dglastonbury@mozilla.com" />
+    <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-box-shadow" />
+    <link rel="help" href="https://www.w3.org/TR/css-color-3/#currentcolor" />
+    <link rel="match" href="color-stop-currentcolor-ref.html" />
+    <style type="text/css">
+     div {
+         color: transparent;
+         padding: 40px;
+         box-shadow: 10px 5px 5px currentcolor;
+     }
+
+     p {
+         padding: 2em;
+         border: 1px solid currentcolor;
+         box-shadow: inherit;
+     }
+    </style>
+  </head>
+  <body>
+    <!-- content of test -->
+    <div>
+      <p style="color: limegreen">
+          This box should have a green box shadow.
+      </p>
+    </div>
+  </body>
+</html>
--- a/layout/reftests/w3c-css/submitted/background/reftest.list
+++ b/layout/reftests/w3c-css/submitted/background/reftest.list
@@ -31,8 +31,11 @@ fuzzy-if(webrender,7-7,216-224) == borde
 == border-image-repeat-space-5.html border-image-repeat-space-5-ref-1.html
 == border-image-repeat-space-5-ref-1.html border-image-repeat-space-5-ref-2.html
 == border-image-repeat-space-6.html border-image-repeat-space-6-ref.html
 == border-image-repeat-space-7.html border-image-repeat-space-7-ref.html
 == border-image-repeat-1.html border-image-repeat-1-ref.html
 
 # background-attachment test cases
 fuzzy-if(webrender,1,10) == background-attachment-fixed-inside-transform-1.html background-attachment-fixed-inside-transform-1-ref.html
+
+# box-shadow with currentcolor test cases
+== box-shadow-currentcolor.html box-shadow-currentcolor-ref.html
\ No newline at end of file
--- a/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list
@@ -125,8 +125,11 @@ fuzzy-if(gtkWidget,3,4) == text-emphasis
 == text-emphasis-line-height-003c.html text-emphasis-line-height-003-ref.html
 == text-emphasis-line-height-003d.html text-emphasis-line-height-003-ref.html
 == text-emphasis-line-height-004a.html text-emphasis-line-height-004-ref.html
 == text-emphasis-line-height-004b.html text-emphasis-line-height-004-ref.html
 == text-emphasis-line-height-004c.html text-emphasis-line-height-004-ref.html
 == text-emphasis-line-height-004d.html text-emphasis-line-height-004-ref.html
 # END tests from support/generate-text-emphasis-line-height-tests.py
 fuzzy-if(gtkWidget,3,4) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),43,1) == text-emphasis-line-height-001z.html text-emphasis-line-height-001-ref.html
+
+# text-shadow 'currentcolor' test cases
+== text-shadow-currentcolor.html text-shadow-currentcolor-ref.html
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-shadow-currentcolor-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Reftest Reference</title>
+    <link rel="author" title="Dan Glastonbury" href="mailto:dglastonbury@mozilla.com" />
+    <style type="text/css">
+     p {
+         text-shadow: 0 0 10px green;
+         color: green;
+         font: 1.5em Georgia, serif;
+     }
+    </style>
+  </head>
+  <body>
+    <!-- content of test -->
+    <p>This text should have a green drop shadow</p>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-shadow-currentcolor.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Test: 'text-shadow' respects 'currentcolor'</title>
+    <link rel="author" title="Dan Glastonbury" href="mailto:dglastonbury@mozilla.com" />
+    <link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property" />
+    <link rel="help" href="https://www.w3.org/TR/css-color-3/#currentcolor" />
+    <link rel="match" href="text-shadow-currentcolor-ref.html" />
+    <style type="text/css">
+     body {
+         color: red;
+         text-shadow: 0 0 10px currentcolor;
+     }
+
+     p {
+         text-shadow: inherit;
+         color: green;
+         font: 1.5em Georgia, serif;
+     }
+    </style>
+  </head>
+  <body>
+    <!-- content of test -->
+    <p>This text should have a green drop shadow</p>
+  </body>
+</html>