Bug 1474959: Add a visited reftest for different logical border color with different writing modes. r=emilio

MozReview-Commit-ID: 7kWSEsuXQzC
This commit is contained in:
Xidorn Quan 2018-07-12 22:08:57 +10:00 committed by Emilio Cobos Álvarez
parent 7a19e88052
commit 99d822fb5f
3 changed files with 45 additions and 0 deletions

View File

@ -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>

View File

@ -81,6 +81,7 @@ TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test['css-visited'] += [
'/layout/reftests/css-visited/link-root-1.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-001.html',
'/layout/reftests/css-visited/logical-box-border-color-visited-link-002.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/logical-box-border-color-visited-link-ref.html',
'/layout/reftests/css-visited/mathml-links-ref.html', '/layout/reftests/css-visited/mathml-links-ref.html',
'/layout/reftests/css-visited/mathml-links.html', '/layout/reftests/css-visited/mathml-links.html',

View File

@ -94,6 +94,7 @@ var gTests = [
"== logical-box-border-color-visited-link-001.html logical-box-border-color-visited-link-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. // 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-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 // We record the maximum number of times we had to look at a test before