| Index: LayoutTests/fast/ime/inputmethodcontext-confirmcomposition.html
|
| diff --git a/LayoutTests/fast/ime/inputmethodcontext-confirmcomposition.html b/LayoutTests/fast/ime/inputmethodcontext-confirmcomposition.html
|
| deleted file mode 100644
|
| index 2dfb11c63cad2545773e4bb7c6fd137302586a7d..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/fast/ime/inputmethodcontext-confirmcomposition.html
|
| +++ /dev/null
|
| @@ -1,67 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../../resources/js-test.js"></script>
|
| -</head>
|
| -<body>
|
| -<input id="test">
|
| -<input id="test2">
|
| -<script>
|
| -description("This tests confirmComposition() of InputMethodContext.");
|
| -
|
| -var test = document.getElementById('test');
|
| -var test2 = document.getElementById('test2');
|
| -
|
| -// Checks .inputMethodContext returns an InputMethodContext object.
|
| -var context = test.inputMethodContext;
|
| -shouldBeTrue('context instanceof InputMethodContext');
|
| -
|
| -var expectedText;
|
| -
|
| -// Register event listeners.
|
| -test.addEventListener('compositionstart', function(event) {
|
| - testPassed('compositionstart fired');
|
| -}, false);
|
| -test.addEventListener('compositionend', function(event) {
|
| - testPassed('compositionend fired');
|
| - shouldBeEqualToString('event.type', 'compositionend');
|
| - shouldBeEqualToString('event.data', expectedText);
|
| -}, false);
|
| -test.addEventListener('textInput', function(event) {
|
| - testPassed('textInput fired');
|
| - shouldBeEqualToString('event.type', 'textInput');
|
| - shouldBeEqualToString('event.data', expectedText);
|
| -}, false);
|
| -
|
| -test.focus();
|
| -
|
| -debug("Check if composition text 'abcd' is committed properly.");
|
| -expectedText = 'abcd';
|
| -textInputController.setComposition(expectedText);
|
| -context.confirmComposition();
|
| -shouldBeEqualToString('test.value', 'abcd');
|
| -
|
| -debug("Check if no compositionend event will occur when composition is empty.");
|
| -context.confirmComposition();
|
| -shouldBeEqualToString('test.value', 'abcd');
|
| -
|
| -debug("Check if composition text 'efgh' is committed properly, and appended to the input field's value.");
|
| -expectedText = 'efgh';
|
| -textInputController.setComposition(expectedText);
|
| -context.confirmComposition();
|
| -shouldBeEqualToString('test.value', 'abcdefgh');
|
| -
|
| -debug("Check if confirmComposition on non-focused element doesn't affect the focused editor.");
|
| -var context2 = test2.inputMethodContext;
|
| -// Focus will still stay in the original field.
|
| -test.focus();
|
| -expectedText = 'ijkl';
|
| -textInputController.setComposition(expectedText);
|
| -// As composition for context2 is not on-going, no events will fire.
|
| -context2.confirmComposition();
|
| -// Cancel the composition.
|
| -expectedText = '';
|
| -textInputController.setComposition(expectedText);
|
| -shouldBeEqualToString('test.value', 'abcdefgh');
|
| -</script>
|
| -</body>
|
| -</html>
|
|
|