Index: LayoutTests/fast/forms/input-user-select-none.html |
diff --git a/LayoutTests/fast/forms/input-user-select-none.html b/LayoutTests/fast/forms/input-user-select-none.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b261bd300f53ec7622671f144fb98e73ea69e041 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/input-user-select-none.html |
@@ -0,0 +1,42 @@ |
+<head> |
+<style> |
+.sample { |
+ -webkit-user-select: none; |
+ user-select: none; |
+} |
+</style> |
+</head> |
+<body> |
+<script src="../js/resources/js-test-pre.js"></script> |
+<div id="container"> |
+<p id="description"></p> |
+Manual step |
+<ol> |
+ <li>Click text input/textarea</li> |
+ <li>Type text</li> |
+</ol> |
+<input class="sample" placeholder="edit me!" value=""><br> |
+<textarea class="sample" placeholder="edit me!" ></textarea> |
+</div> |
+<script> |
+description('Tests user-select:none doesn\'t affect editing'); |
+function $(id) { return document.getElementById(id); } |
+ |
+var sample; |
+var expectedText = 'wxy'; |
+var samples = document.querySelectorAll('.sample'); |
+for (var i = 0; i < samples.length; ++i) { |
+ sample = samples[i]; |
+ sample.focus(); |
+ if (window.eventSender) { |
+ for (var j = 0; j < expectedText.length; ++j) |
+ eventSender.keyDown(expectedText[j]); |
+ shouldBeEqualToString('sample.value', expectedText); |
+ } |
+} |
+ |
+if (window.testRunner) |
+ $('container').outerHTML = ''; |
+</script> |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |