Index: third_party/WebKit/LayoutTests/fast/css/pseudo-placeholder.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/pseudo-placeholder.html b/third_party/WebKit/LayoutTests/fast/css/pseudo-placeholder.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2a79c82467ae98788f73603c854b81095037d195 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/pseudo-placeholder.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<style> |
+input::placeholder:hover { |
+ color: blue; |
+} |
+input::placeholder { |
+ color: green; |
+} |
+input::-webkit-input-placeholder { |
+ background: red; |
+} |
+</style> |
+<script> |
+test(t => { |
+ // 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.
|
+ assert_equals(document.styleSheets[0].rules.length, 2); |
+}, '::placeholder with a user-action selector should be an error.'); |
+ |
+test(t => { |
+ assert_equals(document.styleSheets[0].rules[0].selectorText, 'input::placeholder'); |
+}, 'Serialization for ::placeholder should be ::placeholder.'); |
+ |
+test(t => { |
+ // Compatibility with Safari and Firefox. |
+ assert_equals(document.styleSheets[0].rules[1].selectorText, 'input::-webkit-input-placeholder'); |
+}, 'Serialization for ::-webkit-input-placeholder should be ::-webkit-input-placeholder.'); |
+</script> |