Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: LayoutTests/fast/events/ime-composition-events-001.html

Issue 18041002: compositionstart event's data should contain text to replace. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a testcase for selection. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title></title> 3 <title></title>
4 </head> 4 </head>
5 <body> 5 <body>
6 <p>This tests that calling input-method functions sends Composition Events and T ext Events introduced in DOM Level 3.</p> 6 <p>This tests that calling input-method functions sends Composition Events and T ext Events introduced in DOM Level 3.</p>
7 <p>To test manually, enable an IME, input CJK characters, and see this page does n't show 'FAILED' lines.</p> 7 <p>To test manually, enable an IME, input CJK characters, and see this page does n't show 'FAILED' lines.</p>
8 <input id="test" type="text"/> 8 <input id="test" type="text"/>
9 <ul id="console"></ul> 9 <ul id="console"></ul>
10 <script language="javascript" type="text/javascript"> 10 <script language="javascript" type="text/javascript">
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Case 3: Insert a text without composition. 51 // Case 3: Insert a text without composition.
52 textInputController.insertText('8'); 52 textInputController.insertText('8');
53 53
54 // Case 4: Compose a text and commit it by removing the mark. 54 // Case 4: Compose a text and commit it by removing the mark.
55 // Only Mac and Chromium ports support unmarkText. 55 // Only Mac and Chromium ports support unmarkText.
56 if (textInputController.unmarkText) { 56 if (textInputController.unmarkText) {
57 textInputController.setMarkedText('9', 0, 1); 57 textInputController.setMarkedText('9', 0, 1);
58 textInputController.unmarkText(); 58 textInputController.unmarkText();
59 } 59 }
60
61 // Case 5: Compose a text on selection and commit it.
62 test.value = 'I have a pen';
63 test.selectionStart = 2;
64 test.selectionEnd = 6;
65 textInputController.setMarkedText('lost', 0, 1);
66 textInputController.insertText('made');
67 if (test.value == 'I made a pen') {
68 log('SUCCESS: ' + test.value);
69 } else {
70 log('FAILURE: ' + test.value + ' is not "I made a pen".');
71 }
60 } 72 }
61 </script> 73 </script>
62 </body> 74 </body>
63 </html> 75 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/ime-composition-events-001-expected.txt » ('j') | Source/core/editing/Editor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698