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

Unified Diff: LayoutTests/fast/selectors/input-with-selection-pseudo-element.html

Issue 220343006: Fix for ::selection pseudo element to work on input elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added Layout Test Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/selectors/input-with-selection-pseudo-element.html
diff --git a/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html b/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..1f13bbac381b07dfcb453ec1ede87ba6e8c3d1d2
--- /dev/null
+++ b/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
ojan 2014/04/09 01:57:53 We typically use the html doctype in tests: <!DOCT
+<html>
+ <head>
+ <title>::selection with input element</title>
ojan 2014/04/09 01:57:53 No need to include the html, head, body or title e
+ <style>
+ ::selection { background: green; color:yellow; }
ojan 2014/04/09 01:57:53 Nit: you need a space after the color:.
+ </style>
+ </head>
+ <body>
+ <input id="inputText" type="text" value="Hello" onload="document.execCommand("SelectAll")"></input>
ojan 2014/04/09 01:57:53 I don't think inputs have onload events.
ojan 2014/04/09 01:57:53 Please use 4 space indents.
+ <br>The above selected text in the input box should have green background and yellow color.
+</body>
+<script type="text/javascript">
ojan 2014/04/09 01:57:53 No need to include a type on script elements.
+ window.onload = document.getElementById('inputText').select();
+</script>
ojan 2014/04/09 01:57:53 This test should be done as a reftest so that you
deepak.sa 2014/04/09 14:01:07 As for RefTests, we have to create our own expecte
+</html>

Powered by Google App Engine
This is Rietveld 408576698