OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 description('There was a bug that users could input text longer than maxlength v
ia IME. This test confirms it was fixed.'); | 10 description('There was a bug that users could input text longer than maxlength v
ia IME. This test confirms it was fixed.'); |
11 | 11 |
12 var input = document.createElement('input'); | 12 var input = document.createElement('input'); |
13 input.maxLength = 2; | 13 input.maxLength = 2; |
14 document.body.appendChild(input); | 14 document.body.appendChild(input); |
15 input.focus(); | 15 input.focus(); |
16 textInputController.setMarkedText('abcd', 0, 4); | 16 textInputController.setMarkedText('abcd', 0, 4); |
17 textInputController.insertText('abcd'); // Debug WebKit crashed by this without
the change of bug#25253. | 17 textInputController.insertText('abcd'); // Debug WebKit crashed by this without
the change of bug#25253. |
18 // Check the current value without input.value. | 18 // Check the current value without input.value. |
19 // In Release WebKit, input.value was 'ab' though the user-visible value was 'ab
cd'. | 19 // In Release WebKit, input.value was 'ab' though the user-visible value was 'ab
cd'. |
20 document.execCommand('SelectAll'); | 20 document.execCommand('SelectAll'); |
21 shouldBe('document.getSelection().toString()', '"ab"'); | 21 shouldBe('document.getSelection().toString()', '"ab"'); |
22 </script> | 22 </script> |
23 <script src="../../fast/js/resources/js-test-post.js"></script> | |
24 </body> | 23 </body> |
25 </html> | 24 </html> |
OLD | NEW |