Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / input-select-webkit-user-select-none.html
blob54d4af2cd432354f1439ab3a9f2afc1e16326c87
1 <head>
2 <style>
3 #sample {
4 -webkit-user-select: none;
5 user-select: none;
7 </style>
8 </head>
9 <body>
10 <script src="../../resources/js-test.js"></script>
11 <div id="container">
12 <p id="description"></p>
13 Manual step
14 <ol>
15 <li>Click text input to focus it</li>
16 <li>Hit Ctrl+A to select contents of text input</li>
17 </ol>
18 <input id="sample" value="foobar">
19 </div>
20 <script>
21 description('Tests user-select:none doesn\'t affect select()');
22 function $(id) { return document.getElementById(id); }
24 var sample = $('sample');
25 sample.focus();
26 sample.select();
27 shouldBe('sample.selectionStart', '0');
28 shouldBe('sample.selectionEnd', 'sample.value.length');
30 if (window.testRunner)
31 $('container').outerHTML = '';
32 </script>
33 </body>