blob: 9ef825843bd0c058bad3e5cd1dc9b1295ab2507e [file] [log] [blame]
<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 to focus it</li>
<li>Hit Ctrl+A to select contents of text input</li>
</ol>
<input id="sample" value="foobar">
</div>
<script>
description('Tests user-select:none doesn\'t affect select()');
function $(id) { return document.getElementById(id); }
var sample = $('sample');
sample.focus();
sample.select();
shouldBe('sample.selectionStart', '0');
shouldBe('sample.selectionEnd', 'sample.value.length');
if (window.testRunner)
$('container').outerHTML = '';
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>