diff options
author | Moonchild <moonchild@palemoon.org> | 2020-10-20 09:52:16 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-10-20 09:52:16 +0000 |
commit | e8ae76d473088f140c73376d0f0e324559f344c5 (patch) | |
tree | d6d3ab0488946079b8273cec1589c33e9721e039 /layout/style/test/test_transitions_per_property.html | |
parent | 5072843ee383bd8ae42e50aac304a33f803c0e6a (diff) | |
parent | 23a30020df8a4be6a96fd514fe870260b64a96a1 (diff) | |
download | uxp-e8ae76d473088f140c73376d0f0e324559f344c5.tar.gz |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'layout/style/test/test_transitions_per_property.html')
-rw-r--r-- | layout/style/test/test_transitions_per_property.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/layout/style/test/test_transitions_per_property.html b/layout/style/test/test_transitions_per_property.html index 29e2ae24c2..f188f4f6fb 100644 --- a/layout/style/test/test_transitions_per_property.html +++ b/layout/style/test/test_transitions_per_property.html @@ -1373,6 +1373,21 @@ function test_true_currentcolor_transition(prop, get_color=(x => x), is_shorthan div.style.removeProperty("color"); } +function test_auto_color_transition(prop, get_color=(x => x), is_shorthand=false) { + const msg_prefix = `color-valued property ${prop}: `; + const test_color = "rgb(51, 102, 153)"; + div.style.setProperty("transition-property", "none", ""); + div.style.setProperty(prop, "auto", ""); + let used_value_of_auto = get_color(cs.getPropertyValue(prop)); + isnot(used_value_of_auto, test_color, + msg_prefix + "ensure used auto value is different than our test color"); + + div.style.setProperty("transition-property", prop, ""); + div.style.setProperty(prop, test_color, ""); + is(get_color(cs.getPropertyValue(prop)), test_color, + msg_prefix + "not interpolatable between auto and rgb color"); +} + function get_color_from_shorthand_value(value) { var m = value.match(/rgba?\([^, ]*, [^, ]*, [^, ]*(?:, [^, ]*)?\)/); isnot(m, null, "shorthand property value should contain color"); |