OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>CSS Basic User Interface Test: caret-color computed values</title> |
| 4 <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> |
| 5 <link rel="help" href="http://www.w3.org/TR/css3-ui/#caret-color"> |
| 6 <link rel="help" href="https://drafts.csswg.org/css-color-4/#currentcolor-color"
> |
| 7 <meta name="flags" content="dom"> |
| 8 <meta name="assert" content="Test checks that auto and currentcolor compute to t
hemselves for caret-color and that initial computes to auto"> |
| 9 <script src="/resources/testharness.js"></script> |
| 10 <script src="/resources/testharnessreport.js"></script> |
| 11 <style> |
| 12 #d1 { |
| 13 caret-color: auto; |
| 14 } |
| 15 #d2 { |
| 16 caret-color: currentcolor; |
| 17 } |
| 18 #d3 { |
| 19 caret-color: initial; |
| 20 } |
| 21 </style> |
| 22 <body> |
| 23 <div id=d1></div> |
| 24 <div id=d2></div> |
| 25 <div id=d3></div> |
| 26 <div id=log></div> |
| 27 |
| 28 <script> |
| 29 test( |
| 30 function(){ |
| 31 var d1 = document.getElementById("d1"); |
| 32 assert_equals(window.getComputedStyle(d1)["caret-color"], "auto"); |
| 33 }, "The computed value of auto should be auto"); |
| 34 test( |
| 35 function(){ |
| 36 var d2 = document.getElementById("d2"); |
| 37 assert_equals(window.getComputedStyle(d2)["caret-color"], "currentcolor"); |
| 38 }, "The computed value of currentcolor should be currentcolor"); |
| 39 test( |
| 40 function(){ |
| 41 var d3 = document.getElementById("d3"); |
| 42 assert_equals(window.getComputedStyle(d3)["caret-color"], "auto"); |
| 43 }, "The computed value of initial should be auto"); |
| 44 </script> |
| 45 </body> |
| 46 </html> |
OLD | NEW |