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 in the style element. But the first one should be |
| 18 // dropped. |
| 19 assert_equals(document.styleSheets[0].rules.length, 2); |
| 20 }, '::placeholder with a user-action selector should be an error.'); |
| 21 |
| 22 test(t => { |
| 23 assert_equals(document.styleSheets[0].rules[0].selectorText, 'input::placehold
er'); |
| 24 }, 'Serialization for ::placeholder should be ::placeholder.'); |
| 25 |
| 26 test(t => { |
| 27 // Compatibility with Safari and Firefox. |
| 28 assert_equals(document.styleSheets[0].rules[1].selectorText, 'input::-webkit-i
nput-placeholder'); |
| 29 }, 'Serialization for ::-webkit-input-placeholder should be ::-webkit-input-plac
eholder.'); |
| 30 </script> |
OLD | NEW |