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

Unified Diff: LayoutTests/fast/forms/input-user-select-none.html

Issue 17225002: Make user-select:none not to affect editability (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-19T18:10:01 Created 7 years, 6 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/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>

Powered by Google App Engine
This is Rietveld 408576698