Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Unified Diff: third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html

Issue 2537373005: [css-ui] Make caret-color animatable (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html
diff --git a/third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html b/third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html
new file mode 100644
index 0000000000000000000000000000000000000000..0c79837698b8762cbef4be9281203fa929d53135
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/caret/caret-color-transition.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../animations/resources/animation-test-helpers.js"></script>
+<style>
+textarea {
+ caret-color: magenta;
+ transition: caret-color 1s linear;
+}
+
+textarea.changed {
+ caret-color: lime;
+}
+</style>
+
+<textarea id="textarea"></textarea>
+
+<div id="result">
+</div>
+
+<script>
+var expectedValues = [
+ // [time, element-id, property, expected-value, tolerance]
+ [0, 'textarea', 'caret-color', [255, 0, 255], 2],
+ [0.5, 'textarea', 'caret-color', [128, 128, 128], 2],
+ [1, 'textarea', 'caret-color', [0, 255, 0], 2]
+];
+
+function setupTest() {
+ document.getElementById('textarea').className = 'changed';
+}
+
+runTransitionTest(expectedValues, setupTest);
alancutter (OOO until 2018) 2016/12/01 02:05:31 Please add a test under animations/interpolation u
+</script>

Powered by Google App Engine
This is Rietveld 408576698