| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title> Testcase for bug crbug.com/242715 </title> | 4 <title> Testcase for bug crbug.com/242715 </title> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function runTest() { | 7 function runTest() { |
| 8 description('This test ensures WebKit clears IME composition inside an input
element \ | 8 description('This test ensures WebKit clears IME composition inside an input
element \ |
| 9 when the value is programmatically set.'); | 9 when the value is programmatically set.'); |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 test.value = ''; | 26 test.value = ''; |
| 27 debug('text was removed so there should be no marked text'); | 27 debug('text was removed so there should be no marked text'); |
| 28 shouldBeFalse("textInputController.hasMarkedText()"); | 28 shouldBeFalse("textInputController.hasMarkedText()"); |
| 29 | 29 |
| 30 textInputController.setMarkedText("nihao", 0, 5); | 30 textInputController.setMarkedText("nihao", 0, 5); |
| 31 debug('nihao should marked from 0 to 5'); | 31 debug('nihao should marked from 0 to 5'); |
| 32 shouldBeTrue("textInputController.hasMarkedText()"); | 32 shouldBeTrue("textInputController.hasMarkedText()"); |
| 33 shouldBeEqualToString("textInputController.markedRange().toString()", "0,5")
; | 33 shouldBeEqualToString("textInputController.markedRange().toString()", "0,5")
; |
| 34 | 34 |
| 35 eventSender.keyDown('downArrow'); | 35 eventSender.keyDown('ArrowDown'); |
| 36 | 36 |
| 37 debug('the text was changed so there should be no marked text'); | 37 debug('the text was changed so there should be no marked text'); |
| 38 shouldBeFalse("textInputController.hasMarkedText()"); | 38 shouldBeFalse("textInputController.hasMarkedText()"); |
| 39 | 39 |
| 40 document.body.removeChild(test); | 40 document.body.removeChild(test); |
| 41 isSuccessfullyParsed(); | 41 isSuccessfullyParsed(); |
| 42 } | 42 } |
| 43 </script> | 43 </script> |
| 44 </body> | 44 </body> |
| 45 <body onload="runTest();"> | 45 <body onload="runTest();"> |
| 46 <input id="test" type="text"> | 46 <input id="test" type="text"> |
| 47 <div id="description"></div> | 47 <div id="description"></div> |
| 48 <div id="console"></div> | 48 <div id="console"></div> |
| 49 </body> | 49 </body> |
| 50 </html> | 50 </html> |
| OLD | NEW |