Bug 1474959 part 5 - Add a visited reftest for different logical border color with different writing modes. r?emilio draft
authorXidorn Quan <me@upsuper.org>
Thu, 12 Jul 2018 22:08:57 +1000
changeset 817335 fa4195fb2cb239c3adf6304e56d46e04b3fff125
parent 817334 4a75f87f670f3a5cf558346e7134bc91e317aa2a
child 817349 865192a8ccfe5240d363c5a06c739b09e25743d0
push id116022
push userxquan@mozilla.com
push dateThu, 12 Jul 2018 12:09:47 +0000
reviewersemilio
bugs1474959
milestone63.0a1
Bug 1474959 part 5 - Add a visited reftest for different logical border color with different writing modes. r?emilio MozReview-Commit-ID: 7kWSEsuXQzC
layout/reftests/css-visited/logical-box-border-color-visited-link-003.html
layout/style/test/moz.build
layout/style/test/test_visited_reftests.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-visited/logical-box-border-color-visited-link-003.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Logical Properties: Flow-Relative Border Colors in Visited Links</title>
+<style>
+a {
+  display: inline-block;
+  vertical-align: top;
+  border: 25px solid green;
+  border-top-color: red;
+  border-left-color: red;
+}
+#link1:visited,
+#link2,
+#link3:visited,
+#link4 {
+  direction: rtl;
+}
+#link1:visited,
+#link2:visited,
+#link3,
+#link4 {
+  writing-mode: vertical-rl;
+}
+#link1:visited {
+  border-block-start-color: green;
+  border-inline-start-color: green;
+}
+#link2:visited {
+  border-block-start-color: green;
+  border-inline-end-color: green;
+}
+#link3:visited {
+  border-inline-start-color: green;
+  border-block-end-color: green;
+}
+#link4:visited {
+  border-inline-end-color: green;
+  border-block-end-color: green;
+}
+</style>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<a id="link1" href="visited-page.html"></a><a id="link2" href="visited-page.html"></a><br>
+<a id="link3" href="visited-page.html"></a><a id="link4" href="visited-page.html"></a>
--- a/layout/style/test/moz.build
+++ b/layout/style/test/moz.build
@@ -76,16 +76,17 @@ TEST_HARNESS_FILES.testing.mochitest.tes
     '/layout/reftests/css-visited/first-line-1-ref.html',
     '/layout/reftests/css-visited/first-line-1.html',
     '/layout/reftests/css-visited/inherit-keyword-1-ref.html',
     '/layout/reftests/css-visited/inherit-keyword-1.xhtml',
     '/layout/reftests/css-visited/link-root-1-ref.xhtml',
     '/layout/reftests/css-visited/link-root-1.xhtml',
     '/layout/reftests/css-visited/logical-box-border-color-visited-link-001.html',
     '/layout/reftests/css-visited/logical-box-border-color-visited-link-002.html',
+    '/layout/reftests/css-visited/logical-box-border-color-visited-link-003.html',
     '/layout/reftests/css-visited/logical-box-border-color-visited-link-ref.html',
     '/layout/reftests/css-visited/mathml-links-ref.html',
     '/layout/reftests/css-visited/mathml-links.html',
     '/layout/reftests/css-visited/outline-1-ref.html',
     '/layout/reftests/css-visited/outline-1.html',
     '/layout/reftests/css-visited/placeholder-1-ref.html',
     '/layout/reftests/css-visited/placeholder-1.html',
     '/layout/reftests/css-visited/selector-adj-sibling-1-ref.html',
--- a/layout/style/test/test_visited_reftests.html
+++ b/layout/style/test/test_visited_reftests.html
@@ -89,16 +89,17 @@ var gTests = [
   "== link-root-1.xhtml link-root-1-ref.xhtml",
   "== mathml-links.html mathml-links-ref.html",
   "== placeholder-1.html placeholder-1-ref.html",
   "== visited-inherit-1.html visited-inherit-1-ref.html",
   "== transition-on-visited.html transition-on-visited-ref.html",
   "== logical-box-border-color-visited-link-001.html logical-box-border-color-visited-link-ref.html",
   // TODO: test should equal the reference after implementing logical border shorthands.
   "!= logical-box-border-color-visited-link-002.html logical-box-border-color-visited-link-ref.html",
+  "== logical-box-border-color-visited-link-003.html logical-box-border-color-visited-link-ref.html",
 ];
 
 // We record the maximum number of times we had to look at a test before
 // it switched to the passing state (though we assume it's 10 to start
 // rather than 0 so that we have a reasonable default).  Then we make a
 // test "time out" if it takes more than gTimeoutFactor times that
 // amount of time.  This allows us to report a test failure rather than
 // making a test failure just show up as a timeout.