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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/pseudo-placeholder.html

Issue 2509593002: Implement ::placeholder CSS selector. (Closed)
Patch Set: Introduce PseudoType::PseudoPlaceholder 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698