| Index: LayoutTests/fast/events/ime-composition-events-segments.html
|
| diff --git a/LayoutTests/fast/events/ime-composition-events-segments.html b/LayoutTests/fast/events/ime-composition-events-segments.html
|
| deleted file mode 100644
|
| index 4a6b0c422eaa0cf73ff4d45df689889cb5bd63c2..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/fast/events/ime-composition-events-segments.html
|
| +++ /dev/null
|
| @@ -1,94 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../../resources/js-test.js"></script>
|
| -</head>
|
| -<body>
|
| -<input id="test" type="text">
|
| -<script>
|
| -description('This tests that DOM L3 CompositionEvent segment related properties.');
|
| -
|
| -var expectedStart = 0;
|
| -var expectedEnd = 0;
|
| -var expectedSegments = [];
|
| -
|
| -var segments;
|
| -var i;
|
| -
|
| -function checkCompositionEvent(event) {
|
| - shouldBe('event.activeSegmentStart', stringify(expectedStart));
|
| - shouldBe('event.activeSegmentEnd', stringify(expectedEnd));
|
| - segments = event.getSegments();
|
| - shouldBe('segments.length', stringify(expectedSegments.length));
|
| - for (i = 0; i < expectedSegments.length; ++i) {
|
| - shouldBe('segments[i]', stringify(expectedSegments[i]));
|
| - }
|
| -}
|
| -
|
| -function onCompositionStart(event) {
|
| - shouldBeEqualToString('event.type', 'compositionstart');
|
| - testPassed('event.data is "' + event.data + '"');
|
| - checkCompositionEvent(event);
|
| -}
|
| -
|
| -function onCompositionUpdate(event) {
|
| - shouldBeEqualToString('event.type', 'compositionupdate');
|
| - testPassed('event.data is "' + event.data + '"');
|
| - checkCompositionEvent(event);
|
| -}
|
| -
|
| -function onCompositionEnd(event) {
|
| - shouldBeEqualToString('event.type', 'compositionend');
|
| - testPassed('event.data is "' + event.data + '"');
|
| - checkCompositionEvent(event);
|
| -}
|
| -
|
| -var test = document.getElementById('test');
|
| -test.focus();
|
| -
|
| -test.addEventListener('compositionstart', onCompositionStart, false);
|
| -test.addEventListener('compositionupdate', onCompositionUpdate, false);
|
| -test.addEventListener('compositionend', onCompositionEnd, false);
|
| -
|
| -debug('Case 1: Test from empty input field.');
|
| -
|
| -expectedStart = 0;
|
| -expectedEnd = 3;
|
| -expectedSegments = [0, 3];
|
| -textInputController.setMarkedText('abcdefghi', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -expectedStart = 3;
|
| -expectedEnd = 6;
|
| -expectedSegments = [0, 3, 6];
|
| -textInputController.setMarkedText('abcdefghi', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -expectedStart = 6;
|
| -expectedEnd = 9;
|
| -expectedSegments = [0, 6];
|
| -textInputController.setMarkedText('abcdefghi', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -textInputController.insertText('abcdefghi');
|
| -shouldBeEqualToString('test.value', 'abcdefghi');
|
| -
|
| -debug('Case 2: Test from non-empty input field.');
|
| -
|
| -expectedStart = 0;
|
| -expectedEnd = 3;
|
| -expectedSegments = [0, 3];
|
| -textInputController.setMarkedText('123456789', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -expectedStart = 3;
|
| -expectedEnd = 6;
|
| -expectedSegments = [0, 3, 6];
|
| -textInputController.setMarkedText('123456789', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -expectedStart = 6;
|
| -expectedEnd = 9;
|
| -expectedSegments = [0, 6];
|
| -textInputController.setMarkedText('123456789', expectedStart, expectedEnd - expectedStart);
|
| -
|
| -textInputController.insertText('123456789');
|
| -
|
| -shouldBeEqualToString('test.value', 'abcdefghi123456789');
|
| -</script>
|
| -</body>
|
| -</html>
|
|
|