OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>CSS Basic User Interface Test: caret-color visited link computed value</t
itle> |
| 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"> |
| 6 <link rel="help" href="https://www.w3.org/TR/css3-color/#color0"> |
| 7 <link rel="help" href="https://www.w3.org/TR/selectors4/#link"> |
| 8 <meta name="flags" content="may interact"> |
| 9 <meta name="assert" content="Test checks that computed style of caret-color on v
isited links doesn't leak privacy information."> |
| 10 <script src="../../resources/testharness.js"></script> |
| 11 <script src="../../resources/testharnessreport.js"></script> |
| 12 <style> |
| 13 a { |
| 14 font-size: 3em; |
| 15 font-weight: bold; |
| 16 width: 10em; |
| 17 padding: 10px; |
| 18 background: black; /* the color of a thin object like the caret is easier to
see on a black background. */ |
| 19 |
| 20 color: white; |
| 21 caret-color: lime; |
| 22 } |
| 23 |
| 24 a:link { |
| 25 color: yellow; |
| 26 } |
| 27 |
| 28 a:visited { |
| 29 caret-color: cyan; |
| 30 } |
| 31 </style> |
| 32 <body> |
| 33 <p>Before running this test, the link below must have been visited. It will ha
ve yellow text if this is not the case. If it its text is yellow, you need to na
vigate to this link first. |
| 34 <!-- This is a copy of the W3C test just changing the href on the link, so Bli
nk considers it a visited link. --> |
| 35 <p><a id="link" contenteditable href="">link</a></p> |
| 36 <div id=log></div> |
| 37 |
| 38 <script> |
| 39 test( |
| 40 function(){ |
| 41 var link = document.getElementById("link"); |
| 42 assert_equals(window.getComputedStyle(link)["caret-color"], "rgb(0, 255,
0)"); |
| 43 }, "The computed value of a visited link should be the same than a non-visit
ed link"); |
| 44 </script> |
| 45 </body> |
OLD | NEW |