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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/ime-composition-events-001.html
diff --git a/LayoutTests/fast/events/ime-composition-events-001.html b/LayoutTests/fast/events/ime-composition-events-001.html
index 8b232f67e73c42bf91a20c864257467747d9108d..1a5e59625fcdc3b5791e6babe3c3be81efd5125e 100644
--- a/LayoutTests/fast/events/ime-composition-events-001.html
+++ b/LayoutTests/fast/events/ime-composition-events-001.html
@@ -57,6 +57,18 @@ if (window.testRunner) {
textInputController.setMarkedText('9', 0, 1);
textInputController.unmarkText();
}
+
+ // Case 5: Compose a text on selection and commit it.
+ test.value = 'I have a pen';
+ test.selectionStart = 2;
+ test.selectionEnd = 6;
+ textInputController.setMarkedText('lost', 0, 1);
+ textInputController.insertText('made');
+ if (test.value == 'I made a pen') {
+ log('SUCCESS: ' + test.value);
+ } else {
+ log('FAILURE: ' + test.value + ' is not "I made a pen".');
+ }
}
</script>
</body>
« 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