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

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

Issue 2509593002: Implement ::placeholder CSS selector. (Closed)
Patch Set: Test fix, etc. Created 4 years, 1 month 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 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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698