Bug 1573974: update text-decoration-valid test case r=dholbert,emilio

This patch adds some subtests that exercise the new
`text-decoration-thickness` subproperty.  It also adjusts the
expected serialization for some existing subtests (`currentcolor`
and `solid`) which are simply setting a subproperty to its
initial value, and therefore should serialize to the shorthand's
own effective initial value, which is "none".

Differential Revision: https://phabricator.services.mozilla.com/D42058

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Charlie Marlow 2019-08-15 18:39:23 +00:00
parent 1c6c6b2040
commit 76f9a8c800
2 changed files with 13 additions and 6 deletions

View File

@ -1,10 +1,11 @@
[text-decoration-valid.html]
prefs: [layout.css.text-decoration-thickness.enabled:true]
[e.style['text-decoration'\] = "rgba(10, 20, 30, 0.4) dotted" should set the property value]
expected: FAIL
[e.style['text-decoration'\] = "solid" should set the property value]
[e.style['text-decoration'\] = "from-font" should set the property value] # The below tests are failing because of Bug 1574222
expected: FAIL
[e.style['text-decoration'\] = "currentcolor" should set the property value]
[e.style['text-decoration'\] = "10px" should set the property value]
expected: FAIL

View File

@ -9,12 +9,18 @@
<script>
test_valid_value("text-decoration", "none");
test_valid_value("text-decoration", "line-through");
test_valid_value("text-decoration", "solid");
test_valid_value("text-decoration", "currentcolor");
test_valid_value("text-decoration", "solid", "none");
test_valid_value("text-decoration", "currentcolor", "none");
test_valid_value("text-decoration", "auto", "none");
test_valid_value("text-decoration", "from-font");
test_valid_value("text-decoration", "10px");
test_valid_value("text-decoration", "double overline underline", "underline overline double");
test_valid_value("text-decoration", "underline overline line-through red");
test_valid_value("text-decoration", "rgba(10, 20, 30, 0.4) dotted", "dotted rgba(10, 20, 30, 0.4)");
test_valid_value("text-decoration", "overline green from-font");
test_valid_value("text-decoration", "underline dashed green");
test_valid_value("text-decoration", "underline auto", "underline");
test_valid_value("text-decoration", "line-through 20px");
test_valid_value("text-decoration", "overline 3em");
</script>