Bug 975383 part.9 Remove compositionupdate event dispatchers from all tests r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 03 Oct 2014 15:33:50 +0900
changeset 231748 3ec43ac8b65c6a87b5e983ac3ae86ada3a3fb83d
parent 231747 e730625ff9e11bf232b0b9f46ed1e1583e8c84c8
child 231749 a2192165100c58c7222b0e1786350504a12e87b3
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs975383
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 975383 part.9 Remove compositionupdate event dispatchers from all tests r=smaug
editor/libeditor/tests/test_bug1026397.html
editor/libeditor/tests/test_bug697842.html
editor/libeditor/tests/test_bug795785.html
editor/libeditor/tests/test_contenteditable_text_input_handling.html
layout/base/tests/bug613807-1.html
testing/mochitest/tests/Harness_sanity/test_sanityEventUtils.html
testing/mochitest/tests/SimpleTest/EventUtils.js
toolkit/content/tests/chrome/file_autocomplete_with_composition.js
toolkit/content/tests/chrome/findbar_window.xul
widget/tests/test_assign_event_data.html
widget/tests/test_imestate.html
widget/tests/test_input_events_on_deactive_window.xul
widget/tests/window_composition_text_querycontent.xul
--- a/editor/libeditor/tests/test_bug1026397.html
+++ b/editor/libeditor/tests/test_bug1026397.html
@@ -42,17 +42,16 @@ function runTests()
     input.selectionStart = input.selectionEnd = aCaretOffset;
     if (aAdditionalExplanation) {
       aAdditionalExplanation = " " + aAdditionalExplanation;
     } else {
       aAdditionalExplanation = "";
     }
 
     synthesizeComposition({ type: "compositionstart" });
-    synthesizeComposition({ type: "compositionupdate", data: aInsertString });
     synthesizeText(
       { "composition":
         { "string": aInsertString,
           "clauses":
           [
             { "length": aInsertString.length, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
--- a/editor/libeditor/tests/test_bug697842.html
+++ b/editor/libeditor/tests/test_bug697842.html
@@ -48,31 +48,29 @@ function runTests()
     editor.addEventListener("compositionupdate", handler, true);
     editor.addEventListener("text", handler, true);
 
     // start composition
     synthesizeComposition({ type: "compositionstart" });
 
     // input first character
     composingString = "\u306B";
-    synthesizeComposition({ type: "compositionupdate", data: composingString });
     synthesizeText(
       { "composition":
         { "string": composingString,
           "clauses":
           [
             { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         "caret": { "start": 1, "length": 0 }
       });
 
     // input second character
     composingString = "\u306B\u3085";
-    synthesizeComposition({ type: "compositionupdate", data: composingString });
     synthesizeText(
       { "composition":
         { "string": composingString,
           "clauses":
           [
             { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
--- a/editor/libeditor/tests/test_bug795785.html
+++ b/editor/libeditor/tests/test_bug795785.html
@@ -117,30 +117,28 @@ function doCompositionTest(aElement, aEl
     var str = "Web \u958b\u767a\u8005\u306e\u7686\u3055\u3093\u306f\u3001" +
               "Firefox \u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b HTML5" +
               " \u3084 CSS \u306e\u65b0\u6a5f\u80fd\u3092\u6d3b\u7528\u3059" +
               "\u308b\u3053\u3068\u3067\u3001\u9b45\u529b\u3042\u308b Web " +
               "\u30b5\u30a4\u30c8\u3084\u9769\u65b0\u7684\u306a Web \u30a2" +
               "\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3088\u308a" +
               "\u77ed\u6642\u9593\u3067\u7c21\u5358\u306b\u4f5c\u6210\u3067" +
               "\u304d\u307e\u3059\u3002";
-    synthesizeComposition({ type: "compositionupdate", data: str });
     synthesizeText({
         composition: {
           string: str,
           clauses: [
             { length: str.length, attr: COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         caret: { start: str.length, length: 0 }
       });
     hitEventLoop(function () {
       isnot(aElement.scrollTop, 0,
             aElementDescription + " was not scrolled by composition");
-      synthesizeComposition({ type: "compositionupdate", data: "" });
       synthesizeText({
         composition: { string: "", clauses: [ { length: 0, attr: 0 } ] },
         caret: { start: 0, length: 0 }
       });
       synthesizeComposition({ type: "compositionend", data: "" });
       hitEventLoop(function () {
         is(aElement.scrollTop, 0,
            aElementDescription + " was not scrolled back to the top by canceling composition");
--- a/editor/libeditor/tests/test_contenteditable_text_input_handling.html
+++ b/editor/libeditor/tests/test_contenteditable_text_input_handling.html
@@ -217,17 +217,16 @@ function runTests()
     if (!aFocus._isEditable) {
       return;
     }
 
     // IME
     // start composition
     synthesizeComposition({ type: "compositionstart" });
     // input first character
-    synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
     synthesizeText(
       { "composition":
         { "string": "\u3089",
           "clauses":
           [
             { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
--- a/layout/base/tests/bug613807-1.html
+++ b/layout/base/tests/bug613807-1.html
@@ -45,39 +45,36 @@
     area.focus();
 
     var domWindowUtils = SpecialPowers.getDOMWindowUtils(window);
 
     // start composition
     synthesizeComposition({ type: "compositionstart" });
 
     // input raw characters
-    synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
     synthesizeText(
       { composition:
         { string: "\u306D",
           clauses: [
             { length: 1, attr: domWindowUtils.COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         caret: { start: 1, length: 0 }
       });
-    synthesizeComposition({ type: "compositionupdate", data: "\u306D\u3053" });
     synthesizeText(
       { composition:
         { string: "\u306D\u3053",
           clauses: [
             { length: 2, attr: domWindowUtils.COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         caret: { start: 2, length: 0 }
       });
 
     // convert
-    synthesizeComposition({ type: "compositionupdate", data: "\u732B" });
     synthesizeText(
       { composition:
         { string: "\u732B",
           clauses: [
             { length: 1, attr: domWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
           ]
         },
         caret: { start: 1, length: 0 }
--- a/testing/mochitest/tests/Harness_sanity/test_sanityEventUtils.html
+++ b/testing/mochitest/tests/Harness_sanity/test_sanityEventUtils.html
@@ -119,17 +119,17 @@ function starttest() {
       check = false;
       window.addEventListener("compositionstart", function() { check = true; }, false);
       synthesizeComposition({ type: "compositionstart" });
       is(check, true, 'synthesizeComposition() should dispatch compositionstart');
     
       check = false;
       window.addEventListener("compositionupdate", function() { check = true; }, false);
       synthesizeComposition({ type: "compositionupdate", data: "a" });
-      is(check, true, 'synthesizeComposition() should dispatch compositionupdate');
+      is(check, false, 'synthesizeComposition() should not dispatch compositionupdate without error');
 
       check = false;
       window.addEventListener("text", function() { check = true; }, false);
       synthesizeText(
         { "composition":
           { "string": "a",
             "clauses":
             [
--- a/testing/mochitest/tests/SimpleTest/EventUtils.js
+++ b/testing/mochitest/tests/SimpleTest/EventUtils.js
@@ -865,18 +865,17 @@ const COMPOSITION_ATTR_SELECTEDRAWTEXT  
 const COMPOSITION_ATTR_CONVERTEDTEXT         = 0x04;
 const COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT = 0x05;
 
 /**
  * Synthesize a composition event.
  *
  * @param aEvent               The composition event information.  This must
  *                             have |type| member.  The value must be
- *                             "compositionstart", "compositionend" or
- *                             "compositionupdate".
+ *                             "compositionstart" or "compositionend".
  *                             And also this may have |data| and |locale| which
  *                             would be used for the value of each property of
  *                             the composition event.  Note that the data would
  *                             be ignored if the event type were
  *                             "compositionstart".
  * @param aWindow              Optional (If null, current |window| will be used)
  */
 function synthesizeComposition(aEvent, aWindow)
--- a/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
+++ b/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
@@ -83,33 +83,31 @@ nsDoTestsForAutoCompleteWithComposition.
     // Simple composition when popup hasn't been shown.
     // The autocomplete popup should not be shown during composition, but
     // after compositionend, the popup should be shown.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("m", { type: "keydown", shiftKey: true }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "M" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
-    { description: "compositionupdate shouldn't open the popup",
+    { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "Mo" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
@@ -136,33 +134,31 @@ nsDoTestsForAutoCompleteWithComposition.
     },
     // If composition starts when popup is shown, the compositionstart event
     // should cause closing the popup.
     { description: "compositionstart should close the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("z", { type: "keydown" }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "z" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mo"
     },
-    { description: "compositionupdate shouldn't reopen the popup",
+    { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "zi" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
@@ -188,49 +184,46 @@ nsDoTestsForAutoCompleteWithComposition.
       }, popup: true, value: "Mozi", searchString: "Mozi"
     },
     // If composition is cancelled, the value shouldn't be changed.
     { description: "compositionstart should reclose the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("l", { type: "keydown" }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "l" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "l",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mozil", searchString: "Mozi"
     },
-    { description: "compositionupdate shouldn't reopen the popup",
+    { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "ll" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "ll",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 2, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mozill", searchString: "Mozi"
     },
-    { description: "empty compositionupdate shouldn't reopen the popup",
+    { description: "modifying composition string to empty string shouldn't reopen the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
@@ -259,49 +252,46 @@ nsDoTestsForAutoCompleteWithComposition.
     // string should be the latest value.
     { description: "compositionstart with selected string should close the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
         synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
         synthesizeKey("z", { type: "keydown" }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "z" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mozi"
     },
-    { description: "compositionupdate shouldn't reopen the popup",
+    { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "zi" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 2, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mozi"
     },
-    { description: "empty compositionupdate shouldn't reopen the popup",
+    { description: "modifying composition string to empty string shouldn't reopen the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
@@ -335,49 +325,46 @@ nsDoTestsForAutoCompleteWithComposition.
       }, popup: false, value: "", searchString: ""
     },
     // composition which is canceled shouldn't cause opening the popup.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("m", { type: "keydown", shiftKey: true }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "M" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
-    { description: "compositionupdate shouldn't open the popup",
+    { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "Mo" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 2, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
-    { description: "empty compositionupdate shouldn't open the popup",
+    { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
@@ -411,49 +398,46 @@ nsDoTestsForAutoCompleteWithComposition.
     },
     // If popup is open at starting composition, the popup should be reopened
     // after composition anyway.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("m", { type: "keydown", shiftKey: true }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "M" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
-    { description: "compositionupdate shouldn't open the popup",
+    { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "Mo" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 2, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
-    { description: "empty compositionupdate shouldn't open the popup",
+    { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
@@ -490,49 +474,46 @@ nsDoTestsForAutoCompleteWithComposition.
     // Even if the popup is closed, composition which is canceled should open
     // the popup if the value isn't empty.
     // XXX This might not be good behavior, but anyway, this is minor issue...
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
         synthesizeKey("z", { type: "keydown", shiftKey: true }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "z" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mo"
     },
-    { description: "compositionupdate shouldn't open the popup",
+    { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "zi" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 2, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mo"
     },
-    { description: "empty compositionupdate shouldn't open the popup",
+    { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
@@ -566,33 +547,31 @@ nsDoTestsForAutoCompleteWithComposition.
       }, popup: false, value: "", searchString: ""
     },
     // Testing for nsIAutoCompleteInput.completeDefaultIndex being true.
     { description: "compositionstart shouldn't open the popup (completeDefaultIndex is true)",
       completeDefaultIndex: true,
       execute: function (aWindow) {
         synthesizeKey("m", { type: "keydown", shiftKey: true }, aWindow);
         synthesizeComposition({ type: "compositionstart" }, aWindow);
-        synthesizeComposition({ type: "compositionupdate", data: "M" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
             "caret": { "start": 1, "length": 0 }
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
-    { description: "compositionupdate shouldn't open the popup (completeDefaultIndex is true)",
+    { description: "modifying composition string shouldn't open the popup (completeDefaultIndex is true)",
       completeDefaultIndex: true,
       execute: function (aWindow) {
-        synthesizeComposition({ type: "compositionupdate", data: "Mo" }, aWindow);
         synthesizeText(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
               ]
             },
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -230,17 +230,16 @@
         clicked = true;
       }
 
       gFindBar._findField.inputField.focus();
 
       var searchStr = "text";
 
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: searchStr });
       synthesizeText(
         { "composition":
           { "string": searchStr,
             "clauses":
             [
               { "length": searchStr.length, "attr": COMPOSITION_ATTR_RAWINPUT }
             ]
           },
--- a/widget/tests/test_assign_event_data.html
+++ b/widget/tests/test_assign_event_data.html
@@ -171,28 +171,26 @@ const kTests = [
   },
   { description: "WidgetKeyboardEvent (keyup during composition)",
     targetID: "input-text", eventType: "keyup",
     dispatchEvent: function () {
       document.getElementById(this.targetID).value = "";
       document.getElementById(this.targetID).focus();
       synthesizeKey("a", { type: "keydown" });
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
       synthesizeText({ "composition":
         { "string": "\u306D",
           "clauses":
           [
             { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         "caret": { "start": 1, "length": 0 }
       });
       synthesizeKey("a", { type: "keyup" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
       synthesizeText({ "composition":
         { "string": "\u306D",
           "clauses":
           [
             { "length": 0, "attr": 0 }
           ]
         },
         "caret": { "start": 1, "length": 0 }
@@ -205,28 +203,26 @@ const kTests = [
     todoMismatch: [ ],
   },
   { description: "WidgetKeyboardEvent (keydown during composition)",
     targetID: "input-text", eventType: "keydown",
     dispatchEvent: function () {
       document.getElementById(this.targetID).value = "";
       document.getElementById(this.targetID).focus();
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
       synthesizeText({ "composition":
         { "string": "\u306D",
           "clauses":
           [
             { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         "caret": { "start": 1, "length": 0 }
       });
       synthesizeKey("VK_RETURN", { type: "keydown" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
       synthesizeText({ "composition":
         { "string": "\u306D",
           "clauses":
           [
             { "length": 0, "attr": 0 }
           ]
         },
         "caret": { "start": 1, "length": 0 }
@@ -287,17 +283,16 @@ const kTests = [
     todoMismatch: [],
   },
   { description: "WidgetTextEvent (text)",
     targetID: "input-text", eventType: "text",
     dispatchEvent: function () {
       document.getElementById(this.targetID).value = "";
       document.getElementById(this.targetID).focus();
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
       synthesizeText({ "composition":
         { "string": "\u306D",
           "clauses":
           [
             { "length": 0, "attr": 0 }
           ]
         },
         "caret": { "start": 1, "length": 0 }
@@ -310,17 +305,16 @@ const kTests = [
     todoMismatch: [ ],
   },
   { description: "WidgetCompositionEvent (compositionupdate)",
     targetID: "input-text", eventType: "compositionupdate",
     dispatchEvent: function () {
       document.getElementById(this.targetID).value = "";
       document.getElementById(this.targetID).focus();
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u30E9\u30FC\u30E1\u30F3" });
       synthesizeText({ "composition":
         { "string": "\u30E9\u30FC\u30E1\u30F3",
           "clauses":
           [
             { "length": 0, "attr": 0 }
           ]
         },
         "caret": { "start": 4, "length": 0 }
@@ -346,17 +340,16 @@ const kTests = [
     todoMismatch: [],
   },
   { description: "InternalEditorInputEvent (input at composing)",
     targetID: "input-text", eventType: "input",
     dispatchEvent: function () {
       document.getElementById(this.targetID).value = "";
       document.getElementById(this.targetID).focus();
       synthesizeComposition({ type: "compositionstart" });
-      synthesizeComposition({ type: "compositionupdate", data: "\u30E9\u30FC\u30E1\u30F3" });
       synthesizeText({ "composition":
         { "string": "\u30E9\u30FC\u30E1\u30F3",
           "clauses":
           [
             { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
         "caret": { "start": 4, "length": 0 }
--- a/widget/tests/test_imestate.html
+++ b/widget/tests/test_imestate.html
@@ -1231,18 +1231,16 @@ function runEditorFlagChangeTests()
   var editorIMESupport =
     editor.QueryInterface(Components.interfaces.nsIEditorIMESupport);
   var flags = editor.flags;
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3078\u3093\u3057\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3078\u3093\u3057\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1263,17 +1261,16 @@ function runEditorFlagChangeTests()
 
   editor.flags = flags;
   ok(editorIMESupport.composing,
      description + "#3 IME composition was committed unexpectedly");
   is(gUtils.IMEStatus, gUtils.IME_STATUS_ENABLED,
      description + "#3 IME isn't enabled on HTML editor");
 
   // cancel the composition
-  synthesizeComposition({ type: "compositionupdate", data: "" });
   synthesizeText(
     { "composition":
       { "string": "",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
--- a/widget/tests/test_input_events_on_deactive_window.xul
+++ b/widget/tests/test_input_events_on_deactive_window.xul
@@ -154,17 +154,16 @@ function startTests()
 
     // IME events
     clear();
     // start composition
     synthesizeComposition({ type: "compositionstart" });
     checkCompositionEvents(true, false, false, false, "compositionstart");
     clear();
     // input first character
-    synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
     synthesizeText(
       { "composition":
         { "string": "\u3089",
           "clauses":
           [
             { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
           ]
         },
--- a/widget/tests/window_composition_text_querycontent.xul
+++ b/widget/tests/window_composition_text_querycontent.xul
@@ -189,42 +189,39 @@ function runUndoRedoTest()
 {
   textarea.value = "";
   textarea.focus();
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input raw characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
   synthesizeText(
     { "composition":
       { "string": "\u306D",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 1, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306D\u3053" });
   synthesizeText(
     { "composition":
       { "string": "\u306D\u3053",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 2, "length": 0 }
     });
 
   // convert
-  synthesizeComposition({ type: "compositionupdate", data: "\u732B" });
   synthesizeText(
     { "composition":
       { "string": "\u732B",
         "clauses":
         [
           { "length": 1,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
         ]
@@ -246,30 +243,28 @@ function runUndoRedoTest()
 
   // end composition
   synthesizeComposition({ type: "compositionend", data: "\u732B" });
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input raw characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u307E" });
   synthesizeText(
     { "composition":
       { "string": "\u307E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 1, "length": 0 }
     });
 
   // cancel the composition
-  synthesizeComposition({ type: "compositionupdate", data: "" });
   synthesizeText(
     { "composition":
       { "string": "",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -278,55 +273,50 @@ function runUndoRedoTest()
 
   // end composition
   synthesizeComposition({ type: "compositionend", data: "" });
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input raw characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u3080" });
   synthesizeText(
     { "composition":
       { "string": "\u3080",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 1, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3080\u3059" });
   synthesizeText(
     { "composition":
       { "string": "\u3080\u3059",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 2, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3080\u3059\u3081" });
   synthesizeText(
     { "composition":
       { "string": "\u3080\u3059\u3081",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 3, "length": 0 }
     });
 
   // convert
-  synthesizeComposition({ type: "compositionupdate", data: "\u5A18" });
   synthesizeText(
     { "composition":
       { "string": "\u5A18",
         "clauses":
         [
           { "length": 1,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
         ]
@@ -381,68 +371,61 @@ function runUndoRedoTest()
   synthesizeKey(" ", {});
   synthesizeKey("a", {});
   synthesizeKey(" ", {});
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input raw characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u3088" });
   synthesizeText(
     { "composition":
       { "string": "\u3088",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 1, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3088\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u3088\u3046",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 2, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3088\u3046\u304b" });
   synthesizeText(
     { "composition":
       { "string": "\u3088\u3046\u304b",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 3, "length": 0 }
     });
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3088\u3046\u304b\u3044" });
   synthesizeText(
     { "composition":
       { "string": "\u3088\u3046\u304b\u3044",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 4, "length": 0 }
     });
 
   // convert
-  synthesizeComposition({ type: "compositionupdate", data: "\u5996\u602a" });
   synthesizeText(
     { "composition":
       { "string": "\u5996\u602a",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
         ]
       },
@@ -643,17 +626,16 @@ function runCompositionTest()
     return false;
   }
   caretRects[0] = caretRect;
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input first character
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
   synthesizeText(
     { "composition":
       { "string": "\u3089",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -668,17 +650,16 @@ function runCompositionTest()
   caretRect = synthesizeQueryCaretRect(1);
   if (!checkQueryContentResult(caretRect,
         "runCompositionTest: synthesizeQueryCaretRect #1-1")) {
     return false;
   }
   caretRects[1] = caretRect;
 
   // input second character
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089\u30FC" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -702,18 +683,16 @@ function runCompositionTest()
   is(caretRects[2].top, caretRects[1].top,
      "runCompositionTest: caret is moved to another line (#1-2)");
   is(caretRects[2].width, caretRects[1].width,
      "runCompositionTest: caret width is wrong (#1-2)");
   is(caretRects[2].height, caretRects[1].height,
      "runCompositionTest: caret width is wrong (#1-2)");
 
   // input third character
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -804,18 +783,16 @@ function runCompositionTest()
   is(caretRect.top, caretRects[1].top,
      "runCompositionTest: caret rects are different (#1-3-2, top)");
   // by bug 335359, the caret width depends on the right side's character.
   is(caretRect.width, caretRects[1].width + 1,
      "runCompositionTest: caret rects are different (#1-3-2, width)");
   is(caretRect.height, caretRects[1].height,
      "runCompositionTest: caret rects are different (#1-3-2, height)");
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -824,18 +801,16 @@ function runCompositionTest()
 
   if (!checkContent("\u3089\u30FC\u3081\u3093", "runCompositionTest", "#1-4") ||
       !checkSelection(4, "", "runCompositionTest", "#1-4")) {
     return;
   }
 
 
   // backspace
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -843,90 +818,80 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u3089\u30FC\u3081", "runCompositionTest", "#1-5") ||
       !checkSelection(3, "", "runCompositionTest", "#1-5")) {
     return;
   }
 
   // re-input
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 4, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093", "runCompositionTest", "#1-6") ||
       !checkSelection(4, "", "runCompositionTest", "#1-6")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055",
         "clauses":
         [
           { "length": 5, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 5, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055", "runCompositionTest", "#1-7") ||
       !checkSelection(5, "", "runCompositionTest", "#1-7")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044",
         "clauses":
         [
           { "length": 6, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 6, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044", "runCompositionTest", "#1-8") ||
       !checkSelection(6, "", "runCompositionTest", "#1-8")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053",
         "clauses":
         [
           { "length": 7, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 7, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044\u3053", "runCompositionTest", "#1-8") ||
       !checkSelection(7, "", "runCompositionTest", "#1-8")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
         "clauses":
         [
           { "length": 8, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -935,18 +900,16 @@ function runCompositionTest()
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
                     "runCompositionTest", "#1-9") ||
       !checkSelection(8, "", "runCompositionTest", "#1-9")) {
     return;
   }
 
   // convert
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8" });
   synthesizeText(
     { "composition":
       { "string": "\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8",
         "clauses":
         [
           { "length": 4,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
           { "length": 2,
@@ -979,18 +942,16 @@ function runCompositionTest()
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8",
                     "runCompositionTest", "#1-11") ||
       !checkSelection(6, "", "runCompositionTest", "#1-11")) {
     return;
   }
 
   // reset clauses
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046",
         "clauses":
         [
           { "length": 5,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
           { "length": 3,
@@ -1049,17 +1010,16 @@ function runCompositionTest()
 
   checkRect(textRect3, textRect1, "runCompositionTest: textRect #1-13-1");
   checkRect(textRect4, textRect2, "runCompositionTest: textRect #1-13-2");
 
   // restart composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u3057" });
   synthesizeText(
     { "composition":
       { "string": "\u3057",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1067,17 +1027,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046\u3057",
                     "runCompositionTest", "#2-1") ||
       !checkSelection(8 + 1, "", "runCompositionTest", "#2-1")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3058" });
   synthesizeText(
     { "composition":
       { "string": "\u3058",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1085,17 +1044,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046\u3058",
                     "runCompositionTest", "#2-2") ||
       !checkSelection(8 + 1, "", "runCompositionTest", "#2-2")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3058\u3087" });
   synthesizeText(
     { "composition":
       { "string": "\u3058\u3087",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1103,18 +1061,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046\u3058\u3087",
                     "runCompositionTest", "#2-3") ||
       !checkSelection(8 + 2, "", "runCompositionTest", "#2-3")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3058\u3087\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u3058\u3087\u3046",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1153,17 +1109,16 @@ function runCompositionTest()
 
   if (!checkSelection(4, "\u3055\u884C\u3053\u3046\u3058\u3087\u3046", "runCompositionTest", "#3-1")) {
     return;
   }
 
   // start composition with selection
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u304A" });
   synthesizeText(
     { "composition":
       { "string": "\u304A",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1172,17 +1127,16 @@ function runCompositionTest()
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u304A",
                     "runCompositionTest", "#3-2") ||
       !checkSelection(4 + 1, "", "runCompositionTest", "#3-2")) {
     return;
   }
 
   // remove the composition string
-  synthesizeComposition({ type: "compositionupdate", data: "" });
   synthesizeText(
     { "composition":
       { "string": "",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -1191,17 +1145,16 @@ function runCompositionTest()
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3",
                     "runCompositionTest", "#3-3") ||
       !checkSelection(4, "", "runCompositionTest", "#3-3")) {
     return;
   }
 
   // re-input the composition string
-  synthesizeComposition({ type: "compositionupdate", data: "\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u3046",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1210,17 +1163,16 @@ function runCompositionTest()
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u3046",
                     "runCompositionTest", "#3-4") ||
       !checkSelection(4 + 1, "", "runCompositionTest", "#3-4")) {
     return;
   }
 
   // cancel the composition
-  synthesizeComposition({ type: "compositionupdate", data: "" });
   synthesizeText(
     { "composition":
       { "string": "",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -1269,17 +1221,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3",
                     "runCompositionTest", "#4-2") ||
       !checkSelection(4, "", "runCompositionTest", "#4-2")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u6700" });
   synthesizeText(
     { "composition":
       { "string": "\u6700",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -1362,17 +1313,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3",
                     "runCompositionTest", "#4-8") ||
       !checkSelection(4, "", "runCompositionTest", "#4-8")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u9AD8" });
   synthesizeText(
     { "composition":
       { "string": "\u9AD8",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -1399,17 +1349,16 @@ function runCompositionTest()
       !checkSelection(4, "", "runCompositionTest", "#4-11")) {
     return;
   }
 
   // bug 23558, ancient Japanese IMEs on Window may send empty text event
   // twice at canceling composition.
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u6700" });
   synthesizeText(
     { "composition":
       { "string": "\u6700",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1417,17 +1366,16 @@ function runCompositionTest()
     });
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u6700",
                     "runCompositionTest", "#5-1") ||
       !checkSelection(4 + 1, "", "runCompositionTest", "#5-1")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate", data: "" });
   synthesizeText(
     { "composition":
       { "string": "",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -1591,17 +1539,16 @@ function runCompositionEventTest()
                          true, true);
   input.addEventListener("input", formEventHandlerForInput,
                          true, true);
 
   // test for normal case
   initResults();
 
   synthesizeComposition({ type: "compositionstart" });
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
   synthesizeText(
     { "composition":
       { "string": "\u3089",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1643,17 +1590,16 @@ function runCompositionEventTest()
      kDescription + "input hasn't been handled by window #1");
   is(windowEventData["input"], "\u3089",
      kDescription + "value of input element wasn't modified (window) #1");
   is(inputEventCounts["input"], 1,
      kDescription + "input hasn't been handled by input #1");
   is(inputEventData["input"], "\u3089",
      kDescription + "value of input element wasn't modified (input) #1");
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089\u30FC" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1740,17 +1686,16 @@ function runCompositionEventTest()
 
   // select the second character, then, data of composition start should be
   // the selected character.
   initResults();
   synthesizeKey("VK_LEFT", { shiftKey: true });
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
   synthesizeText(
     { "composition":
       { "string": "\u3089",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1821,17 +1766,16 @@ function runCompositionEventTest()
   // preventDefault() should effect nothing.
   preventDefault = true;
 
   initResults();
   synthesizeKey("A", { accelKey: true }); // Select All
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306D" });
   synthesizeText(
     { "composition":
       { "string": "\u306D",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -1904,17 +1848,16 @@ function runCompositionEventTest()
   // stopPropagation() should effect nothing (except event count)
   stopPropagation = true;
 
   initResults();
   synthesizeKey("A", { accelKey: true }); // Select All
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2290,17 +2233,16 @@ function runForceCommitTest()
 
   // Make the composition in textarea commit by click in the textarea
   textarea.focus();
   textarea.value = "";
 
   events = [];
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2344,17 +2286,16 @@ function runForceCommitTest()
 
   // Make the composition in textarea commit by click in another editor (input)
   textarea.focus();
   textarea.value = "";
   input.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2390,17 +2331,16 @@ function runForceCommitTest()
      "runForceCommitTest: the input has the committed text? #3");
 
   // Make the composition in textarea commit by blur()
   textarea.focus();
   textarea.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2433,17 +2373,16 @@ function runForceCommitTest()
 
   // Make the composition in textarea commit by input.focus()
   textarea.focus();
   textarea.value = "";
   input.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2480,17 +2419,16 @@ function runForceCommitTest()
 
   // Make the composition in textarea commit by click in another document's editor
   textarea.focus();
   textarea.value = "";
   textareaInFrame.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2527,17 +2465,16 @@ function runForceCommitTest()
 
   // Make the composition in textarea commit by another document's editor's focus()
   textarea.focus();
   textarea.value = "";
   textareaInFrame.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2575,17 +2512,16 @@ function runForceCommitTest()
   // Make the composition in a textarea commit by click in another editable document
   textarea.focus();
   textarea.value = "";
   iframe2.contentDocument.body.innerHTML = "Text in the Body";
   var iframe2BodyInnerHTML = iframe2.contentDocument.body.innerHTML;
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2622,17 +2558,16 @@ function runForceCommitTest()
 
   // Make the composition in an editable document commit by click in it
   iframe2.contentWindow.focus();
   iframe2.contentDocument.body.innerHTML = "Text in the Body";
   iframe2BodyInnerHTML = iframe2.contentDocument.body.innerHTML;
 
   synthesizeComposition({ type: "compositionstart" }, iframe2.contentWindow);
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" }, iframe2.contentWindow);
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2667,17 +2602,16 @@ function runForceCommitTest()
   // Make the composition in an editable document commit by click in another document's editor
   textarea.value = "";
   iframe2.contentWindow.focus();
   iframe2.contentDocument.body.innerHTML = "Text in the Body";
   iframe2BodyInnerHTML = iframe2.contentDocument.body.innerHTML;
 
   synthesizeComposition({ type: "compositionstart" }, iframe2.contentWindow);
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" }, iframe2.contentWindow);
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2717,17 +2651,16 @@ function runForceCommitTest()
   iframe2.contentWindow.focus();
   iframe2.contentDocument.body.innerHTML = "Text in the Body";
   iframe2BodyInnerHTML = iframe2.contentDocument.body.innerHTML;
   iframe3.contentDocument.body.innerHTML = "Text in the Body";
   iframe3BodyInnerHTML = iframe2.contentDocument.body.innerHTML;
 
   synthesizeComposition({ type: "compositionstart" }, iframe2.contentWindow);
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" }, iframe2.contentWindow);
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2821,17 +2754,16 @@ function runIsComposingTest()
   expectedIsComposing = false;
   description = "events before dispatching compositionstart";
   synthesizeKey("VK_LEFT", {});
 
   synthesizeKey("a", { type: "keydown" });
   synthesizeComposition({ type: "compositionstart" });
   expectedIsComposing = true;
   description = "events after dispatching compositionstart";
-  synthesizeComposition({ type: "compositionupdate", data: "\u3042" });
   synthesizeText(
     { "composition":
       { "string": "\u3042",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2883,17 +2815,16 @@ function runRemoveContentTest(aCallback)
   textarea.addEventListener("input", eventHandler, true);
   textarea.addEventListener("text", eventHandler, true);
 
   textarea.focus();
   textarea.value = "";
 
   synthesizeComposition({ type: "compositionstart" });
 
-  synthesizeComposition({ type: "compositionupdate", data: "\u306E" });
   synthesizeText(
     { "composition":
       { "string": "\u306E",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -2983,18 +2914,16 @@ function runTestOnAnotherContext(aPanelO
                      "height": r.bottom - r.top };
   checkRectContainsRect(editorRect, parentRect, aTestName +
                         ": the editor rect coordinates are wrong");
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3078\u3093\u3057\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3078\u3093\u3057\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3002,17 +2931,16 @@ function runTestOnAnotherContext(aPanelO
     });
 
   if (!checkContent("\u3078\u3093\u3057\u3093", aTestName, "#1-1") ||
       !checkSelection(4, "", aTestName, "#1-1")) {
     return;
   }
 
   // convert them #1
-  synthesizeComposition({ type: "compositionupdate", data: "\u8FD4\u4FE1" });
   synthesizeText(
     { "composition":
       { "string": "\u8FD4\u4FE1",
         "clauses":
         [
           { "length": 2,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
         ]
@@ -3021,17 +2949,16 @@ function runTestOnAnotherContext(aPanelO
     });
 
   if (!checkContent("\u8FD4\u4FE1", aTestName, "#1-2") ||
       !checkSelection(2, "", aTestName, "#1-2")) {
     return;
   }
 
   // convert them #2
-  synthesizeComposition({ type: "compositionupdate", data: "\u5909\u8EAB" });
   synthesizeText(
     { "composition":
       { "string": "\u5909\u8EAB",
         "clauses":
         [
           { "length": 2,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
         ]
@@ -3140,17 +3067,16 @@ function runMaxLengthTest()
   input.focus();
 
   var kDesc ="runMaxLengthTest";
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input first character
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
   synthesizeText(
     { "composition":
       { "string": "\u3089",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3158,17 +3084,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u3089", kDesc, "#1-1") ||
       !checkSelection(1, "", kDesc, "#1-1")) {
     return;
   }
 
   // input second character
-  synthesizeComposition({ type: "compositionupdate", data: "\u3089\u30FC" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3176,18 +3101,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u3089\u30FC", kDesc, "#1-2") ||
       !checkSelection(2, "", kDesc, "#1-2")) {
     return;
   }
 
   // input third character
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3195,18 +3118,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u3089\u30FC\u3081", kDesc, "#1-3") ||
       !checkSelection(3, "", kDesc, "#1-3")) {
     return;
   }
 
   // input fourth character
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3215,18 +3136,16 @@ function runMaxLengthTest()
 
   if (!checkContent("\u3089\u30FC\u3081\u3093", kDesc, "#1-4") ||
       !checkSelection(4, "", kDesc, "#1-4")) {
     return;
   }
 
 
   // backspace
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081",
         "clauses":
         [
           { "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3234,72 +3153,64 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u3089\u30FC\u3081", kDesc, "#1-5") ||
       !checkSelection(3, "", kDesc, "#1-5")) {
     return;
   }
 
   // re-input
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093",
         "clauses":
         [
           { "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 4, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093", kDesc, "#1-6") ||
       !checkSelection(4, "", kDesc, "#1-6")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055",
         "clauses":
         [
           { "length": 5, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 5, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055", kDesc, "#1-7") ||
       !checkSelection(5, "", kDesc, "#1-7")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044",
         "clauses":
         [
           { "length": 6, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
       "caret": { "start": 6, "length": 0 }
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044", kDesc, "#1-8") ||
       !checkSelection(6, "", kDesc, "#1-8")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053",
         "clauses":
         [
           { "length": 7, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3307,18 +3218,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044\u3053",
                     kDesc, "#1-8") ||
       !checkSelection(7, "", kDesc, "#1-8")) {
     return;
   }
 
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046" });
   synthesizeText(
     { "composition":
       { "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
         "clauses":
         [
           { "length": 8, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3327,18 +3236,16 @@ function runMaxLengthTest()
 
   if (!checkContent("\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
                     kDesc, "#1-9") ||
       !checkSelection(8, "", kDesc, "#1-9")) {
     return;
   }
 
   // convert
-  synthesizeComposition({ type: "compositionupdate",
-                          data: "\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8" });
   synthesizeText(
     { "composition":
       { "string": "\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8",
         "clauses":
         [
           { "length": 4,
             "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
           { "length": 2,
@@ -3372,17 +3279,16 @@ function runMaxLengthTest()
 
   synthesizeComposition({ type: "compositionend",
                           data: "\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8" });
 
   // restart composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u3057" });
   synthesizeText(
     { "composition":
       { "string": "\u3057",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3390,17 +3296,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u30E9\u3057", kDesc, "#2-1") ||
       !checkSelection(1 + 1, "", kDesc, "#2-1")) {
     return;
   }
 
   // commit the composition string
-  synthesizeComposition({ type: "compositionupdate", data: "\u3058" });
   synthesizeText(
     { "composition":
       { "string": "\u3058",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -3448,17 +3353,16 @@ function runMaxLengthTest()
   // the carest is at start of the content.
   input.value = "X";
   input.selectionStart = input.selectionEnd = 0;
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u9B54" });
   synthesizeText(
     { "composition":
       { "string": "\u9B54",
         "clauses":
         [
           { "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3466,17 +3370,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u9B54X", kDesc, "#4-1") ||
       !checkSelection(1, "", kDesc, "#4-1")) {
     return;
   }
 
   // commit the composition string
-  synthesizeComposition({ type: "compositionupdate", data: "\u9B54" });
   synthesizeText(
     { "composition":
       { "string": "\u9B54",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },
@@ -3491,17 +3394,16 @@ function runMaxLengthTest()
   }
 
   synthesizeComposition({ type: "compositionend", data: "\u9B54" });
 
   // start composition
   synthesizeComposition({ type: "compositionstart" });
 
   // input characters
-  synthesizeComposition({ type: "compositionupdate", data: "\u9B54\u6CD5" });
   synthesizeText(
     { "composition":
       { "string": "\u9B54\u6CD5",
         "clauses":
         [
           { "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
         ]
       },
@@ -3509,17 +3411,16 @@ function runMaxLengthTest()
     });
 
   if (!checkContent("\u9B54\u6CD5X", kDesc, "#5-1") ||
       !checkSelection(2, "", kDesc, "#5-1")) {
     return;
   }
 
   // commit the composition string
-  synthesizeComposition({ type: "compositionupdate", data: "\u9B54\u6CD5" });
   synthesizeText(
     { "composition":
       { "string": "\u9B54\u6CD5",
         "clauses":
         [
           { "length": 0, "attr": 0 }
         ]
       },