<head>
<style>
.sample {
-webkit-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<script src="../../resources/js-test.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>
</body>