summaryrefslogtreecommitdiffstats
path: root/layout/style/test/test_transitions_per_property.html
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-09-29 11:31:46 -0500
committerMoonchild <moonchild@palemoon.org>2020-10-24 10:36:47 +0000
commitc1ef9546792e8d5881c9516d8e51de3cd6999f79 (patch)
treef9c493220c5af9df81cd6c1938d1d35a4a0eb1d5 /layout/style/test/test_transitions_per_property.html
parenteac19e335655e462c5a100b64d9016094cdbe34a (diff)
downloadUXP-c1ef9546792e8d5881c9516d8e51de3cd6999f79.tar
UXP-c1ef9546792e8d5881c9516d8e51de3cd6999f79.tar.gz
UXP-c1ef9546792e8d5881c9516d8e51de3cd6999f79.tar.lz
UXP-c1ef9546792e8d5881c9516d8e51de3cd6999f79.tar.xz
UXP-c1ef9546792e8d5881c9516d8e51de3cd6999f79.zip
Issue #1668 - Part 1: Implement support for caret-color property.
This CSS property allows input carets (that blinking input cursor you see in text fields), to be given a custom color. This was implemented in Firefox 53, and it was such a minor feature that no one ever missed it, but I don't see any harm in implementing this. https://bugzilla.mozilla.org/show_bug.cgi?id=1063162
Diffstat (limited to 'layout/style/test/test_transitions_per_property.html')
-rw-r--r--layout/style/test/test_transitions_per_property.html15
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 29e2ae24c..f188f4f6f 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");