OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <style> | |
5 input::placeholder:hover { | |
6 color: blue; | |
7 } | |
8 input::placeholder { | |
9 color: green; | |
10 } | |
11 input::-webkit-input-placeholder { | |
12 background: red; | |
13 } | |
14 </style> | |
15 <script> | |
16 test(t => { | |
17 // There are three rules. But the first one should not be counted. | |
rune
2016/11/21 08:52:33
"should not be counted" -> "should be dropped"
tkent
2016/11/21 09:23:39
Done.
| |
18 assert_equals(document.styleSheets[0].rules.length, 2); | |
19 }, '::placeholder with a user-action selector should be an error.'); | |
20 | |
21 test(t => { | |
22 assert_equals(document.styleSheets[0].rules[0].selectorText, 'input::placehold er'); | |
23 }, 'Serialization for ::placeholder should be ::placeholder.'); | |
24 | |
25 test(t => { | |
26 // Compatibility with Safari and Firefox. | |
27 assert_equals(document.styleSheets[0].rules[1].selectorText, 'input::-webkit-i nput-placeholder'); | |
28 }, 'Serialization for ::-webkit-input-placeholder should be ::-webkit-input-plac eholder.'); | |
29 </script> | |
OLD | NEW |