Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / move-by-word-visually-textarea.html
blob74edcb1e84f286f94124ddd9d42337717925fd7f
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
5 onload = function() {
6 var sel = window.getSelection();
7 sel.empty();
9 var test = document.getElementById("test_move_by_word");
10 test.focus();
11 test.value = "word word word\n\n\nword\n\n\n ";
12 test.selectionDirection = 'none';
13 test.selectionStart = 0;
14 test.selectionEnd = 0;
16 var wordBreaks = test.title.split(" ");
17 var fail = false;
18 var i;
19 for (i = 0; i < 5; ++i) {
20 var start = test.selectionStart;
21 sel.modify("move", "right", "word");
22 var wordBreak;
23 if (i >= wordBreaks.length)
24 wordBreak = wordBreaks[wordBreaks.length - 1];
25 else
26 wordBreak = wordBreaks[i];
27 if (test.selectionStart != wordBreak) {
28 testFailed("Expected: " + start + " -> " + wordBreak + "; Actual : " + start + " -> " + test.selectionStart);
29 fail = true;
33 if (fail == false)
34 testPassed("Pass");
37 if (window.testRunner && window.internals) {
38 testRunner.dumpAsText();
39 internals.settings.setEditingBehavior('win');
41 </script>
43 <textarea title = "5 10 17 27" dir=ltr id="test_move_by_word"></textarea>