OLD | NEW |
1 <meta charset="UTF-8"> | 1 <meta charset="UTF-8"> |
2 <script src="../../fast/js/resources/js-test-pre.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <div id="test"></div> | 3 <div id="test"></div> |
4 <script> | 4 <script> |
5 description("This test checks that we have simple caret motion up to a certain l
imit"); | 5 description("This test checks that we have simple caret motion up to a certain l
imit"); |
6 | 6 |
7 function hasSimpleCaretMovement(charCode) { | 7 function hasSimpleCaretMovement(charCode) { |
8 var testString = "aaaaa" + String.fromCharCode(charCode) + "bbbb"; | 8 var testString = "aaaaa" + String.fromCharCode(charCode) + "bbbb"; |
9 element.textContent = testString; | 9 element.textContent = testString; |
10 var selection = window.getSelection(); | 10 var selection = window.getSelection(); |
11 selection.setPosition(element, 0); | 11 selection.setPosition(element, 0); |
12 for (var i = 0; i < testString.length; ++i) { | 12 for (var i = 0; i < testString.length; ++i) { |
(...skipping 24 matching lines...) Expand all Loading... |
37 debug("Brute force:"); | 37 debug("Brute force:"); |
38 for (var i = 1; i < 1024; ++i) { | 38 for (var i = 1; i < 1024; ++i) { |
39 if (i >= 0x0300 && i <= 0x036F) | 39 if (i >= 0x0300 && i <= 0x036F) |
40 shouldBeFalse("hasSimpleCaretMovement(i) // i = U+" + toHex(i)); | 40 shouldBeFalse("hasSimpleCaretMovement(i) // i = U+" + toHex(i)); |
41 else | 41 else |
42 shouldBeTrue("hasSimpleCaretMovement(i) // i = U+" + toHex(i)); | 42 shouldBeTrue("hasSimpleCaretMovement(i) // i = U+" + toHex(i)); |
43 } | 43 } |
44 | 44 |
45 element.textContent = ""; | 45 element.textContent = ""; |
46 </script> | 46 </script> |
OLD | NEW |