Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / text-control-select-blurred.html
blobef1b73f83f3c296f9214c84dfdfe1eca2feb0976
1 <div>Tests that setting selectionEnd on a blurred text control does not clobber selectionStart.</div>
2 <textarea>This is dummy text. This is dummy text.</textarea>
3 <input value="This is dummy text. This is dummy text">
4 <pre id="logger"></pre>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 function assert(property, actual, expected)
11 if (expected == actual)
12 result = "PASS";
13 else
14 result = "FAIL: " + property + " was " + actual + " expected " + expected + ".";
16 document.getElementById('logger').innerHTML += result + "\n";
19 function runTest(editArea)
21 editArea.selectionStart = 10;
22 editArea.blur();
23 assert("selectionStart", editArea.selectionStart, 10);
24 editArea.selectionEnd = 20;
25 assert("selectionStart", editArea.selectionStart, 10);
26 assert("selectionEnd", editArea.selectionEnd, 20);
28 runTest(document.querySelector('textarea'));
29 runTest(document.querySelector('input'));
30 </script>