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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/csswg-test/css-ui-3/caret-color-013.html

Issue 2577633002: [css-ui] Update resolved value of caret-color property (Closed)
Patch Set: Fix tests 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>CSS Basic User Interface Test: caret-color dynamic changes</title> 3 <title>CSS Basic User Interface Test: caret-color dynamic changes</title>
4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
5 <link rel="help" href="http://www.w3.org/TR/css3-ui/#caret-color"> 5 <link rel="help" href="http://www.w3.org/TR/css3-ui/#caret-color">
6 <link rel="help" href="https://www.w3.org/TR/css3-color/#color0"> 6 <link rel="help" href="https://www.w3.org/TR/css3-color/#color0">
7 <meta name="flags" content="dom"> 7 <meta name="flags" content="dom">
8 <meta name="assert" content="Test checks checks that carret-color can be correct ly changed using the style attribute, and that the computed value is done correc tly."> 8 <meta name="assert" content="Test checks checks that carret-color can be correct ly changed using the style attribute, and that the computed value is done correc tly.">
9 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharness.js"></script>
10 <script src="/resources/testharnessreport.js"></script> 10 <script src="/resources/testharnessreport.js"></script>
(...skipping 14 matching lines...) Expand all
25 25
26 function setAndCheckCaretColor(element, caretColor, styleValue, computedStyleV alue, description) { 26 function setAndCheckCaretColor(element, caretColor, styleValue, computedStyleV alue, description) {
27 element.style.caretColor = caretColor; 27 element.style.caretColor = caretColor;
28 test(function() { 28 test(function() {
29 testStyleCaretColor(element, styleValue); 29 testStyleCaretColor(element, styleValue);
30 testComputedStyleCaretColor(element, computedStyleValue); 30 testComputedStyleCaretColor(element, computedStyleValue);
31 }, description); 31 }, description);
32 } 32 }
33 33
34 var textarea = document.getElementById("textarea"); 34 var textarea = document.getElementById("textarea");
35 setAndCheckCaretColor(textarea, "", "", "auto", "Test default caret-color"); 35 setAndCheckCaretColor(textarea, "", "", "rgb(0, 0, 0)", "Test default caret-co lor");
36 setAndCheckCaretColor(textarea, "initial", "initial", "auto", "Test caret-colo r: initial"); 36 setAndCheckCaretColor(textarea, "initial", "initial", "rgb(0, 0, 0)", "Test ca ret-color: initial");
37 setAndCheckCaretColor(textarea, "inherit", "inherit", "auto", "Test caret-colo r: inherit"); 37 setAndCheckCaretColor(textarea, "inherit", "inherit", "rgb(0, 0, 0)", "Test ca ret-color: inherit");
38 setAndCheckCaretColor(textarea, "auto", "auto", "auto", "Test caret-color: aut o"); 38 setAndCheckCaretColor(textarea, "auto", "auto", "rgb(0, 0, 0)", "Test caret-co lor: auto");
39 setAndCheckCaretColor(textarea, "currentcolor", "currentcolor", "currentcolor" , "Test caret-color: currentcolor"); 39 setAndCheckCaretColor(textarea, "currentcolor", "currentcolor", "rgb(0, 0, 0)" , "Test caret-color: currentcolor");
40 setAndCheckCaretColor(textarea, "lime", "lime", "rgb(0, 255, 0)", "Test caret- color: lime"); 40 setAndCheckCaretColor(textarea, "lime", "lime", "rgb(0, 255, 0)", "Test caret- color: lime");
41 setAndCheckCaretColor(textarea, "initial", "initial", "auto", "Reset caret-col or: initial"); 41 setAndCheckCaretColor(textarea, "initial", "initial", "rgb(0, 0, 0)", "Reset c aret-color: initial");
42 setAndCheckCaretColor(textarea, "rgb(0, 100, 100)", "rgb(0, 100, 100)", "rgb(0 , 100, 100)", "Test caret-color: rgb(0, 100, 100)"); 42 setAndCheckCaretColor(textarea, "rgb(0, 100, 100)", "rgb(0, 100, 100)", "rgb(0 , 100, 100)", "Test caret-color: rgb(0, 100, 100)");
43 43
44 var wrapper = document.getElementById("wrapper"); 44 var wrapper = document.getElementById("wrapper");
45 wrapper.style.caretColor = "green"; 45 wrapper.style.caretColor = "green";
46 46
47 setAndCheckCaretColor(textarea, "initial", "initial", "auto", "Test caret-colo r: initial (inherited)"); 47 setAndCheckCaretColor(textarea, "initial", "initial", "rgb(0, 0, 0)", "Test ca ret-color: initial (inherited)");
48 setAndCheckCaretColor(textarea, "inherit", "inherit", "rgb(0, 128, 0)", "Test caret-color: inherit (inherited)"); 48 setAndCheckCaretColor(textarea, "inherit", "inherit", "rgb(0, 128, 0)", "Test caret-color: inherit (inherited)");
49 setAndCheckCaretColor(textarea, "blue", "blue", "rgb(0, 0, 255)", "Test caret- color: blue (inherited)"); 49 setAndCheckCaretColor(textarea, "blue", "blue", "rgb(0, 0, 255)", "Test caret- color: blue (inherited)");
50 </script> 50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698