Bug 1267312 - Part 1. A mochitest to verify that when text-decoration-color is currentColor, the value of it should be the same with color prop. r=jfkthame

MozReview-Commit-ID: LBcHLWPawB7

--HG--
extra : rebase_source : 12bfede09afba60e101d673e7879f883b461b401
This commit is contained in:
cku 2016-09-27 02:51:54 +08:00
parent 454c66daff
commit 6043b617d5
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[webkit-text-fill-color-currentColor.html]
type: testharness
prefs: [layout.css.prefixes.webkit:true]

View File

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