Bug 543789 part.8 Add composition event tests r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 22 Sep 2011 18:17:41 +0900
changeset 77317 cc42e81d78b22bd7834a06347b32b323a4be52d8
parent 77316 df8272331d537e4c3577eae41e5c5bc3c506f42f
child 77318 65b0c8cc5d41ab16b6b3ea6c37eb88a759af23c6
push id21194
push usereakhgari@mozilla.com
push dateThu, 22 Sep 2011 15:27:25 +0000
treeherdermozilla-central@45db8c3384e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs543789
milestone9.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 543789 part.8 Add composition event tests r=smaug
widget/tests/window_composition_text_querycontent.xul
--- a/widget/tests/window_composition_text_querycontent.xul
+++ b/widget/tests/window_composition_text_querycontent.xul
@@ -1194,22 +1194,560 @@ function runCompositionTest()
 
   if (!checkContent("\u30E9\u30FC\u30E1\u30F3",
                     "runCompositionTest", "#3-5") ||
       !checkSelection(4, "", "runCompositionTest", "#3-5")) {
     return;
   }
 }
 
+function runCompositionEventTest()
+{
+  const kDescription = "runCompositionEventTest: ";
+  const kEvents = ["compositionstart", "compositionupdate", "compositionend"];
+
+  input.value = "";
+  input.focus();
+
+  var windowEventCounts = [], windowEventData = [], windowEventLocale = [];
+  var inputEventCounts = [], inputEventData = [], inputEventLocale = [];
+  var preventDefault = false;
+  var stopPropagation = false;
+
+  function initResults()
+  {
+    for (var i = 0; i < kEvents.length; i++) {
+      windowEventCounts[kEvents[i]] = 0;
+      windowEventData[kEvents[i]] = "";
+      windowEventLocale[kEvents[i]] = "";
+      inputEventCounts[kEvents[i]] = 0;
+      inputEventData[kEvents[i]] = "";
+      inputEventLocale[kEvents[i]] = "";
+    }
+  }
+
+  function compositionEventHandlerForWindow(aEvent)
+  {
+    windowEventCounts[aEvent.type]++;
+    windowEventData[aEvent.type] = aEvent.data;
+    windowEventLocale[aEvent.type] = aEvent.locale;
+    if (preventDefault) {
+      aEvent.preventDefault();
+    }
+    if (stopPropagation) {
+      aEvent.stopPropagation();
+    }
+  }
+
+  function compositionEventHandlerForInput(aEvent)
+  {
+    inputEventCounts[aEvent.type]++;
+    inputEventData[aEvent.type] = aEvent.data;
+    inputEventLocale[aEvent.type] = aEvent.locale;
+    if (preventDefault) {
+      aEvent.preventDefault();
+    }
+    if (stopPropagation) {
+      aEvent.stopPropagation();
+    }
+  }
+
+  window.addEventListener("compositionstart", compositionEventHandlerForWindow,
+                          true, true);
+  window.addEventListener("compositionend", compositionEventHandlerForWindow,
+                          true, true);
+  window.addEventListener("compositionupdate", compositionEventHandlerForWindow,
+                          true, true);
+
+  input.addEventListener("compositionstart", compositionEventHandlerForInput,
+                         true, true);
+  input.addEventListener("compositionend", compositionEventHandlerForInput,
+                         true, true);
+  input.addEventListener("compositionupdate", compositionEventHandlerForInput,
+                         true, true);
+
+  // test for normal case
+  initResults();
+
+  synthesizeComposition({ type: "compositionstart" });
+  synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
+  synthesizeText(
+    { "composition":
+      { "string": "\u3089",
+        "clauses":
+        [
+          { "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by window #1");
+  is(windowEventData["compositionstart"], "",
+     kDescription + "data of compositionstart isn't empty (window) #1");
+  is(windowEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (window) #1");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by input #1");
+  is(inputEventData["compositionstart"], "",
+     kDescription + "data of compositionstart isn't empty (input) #1");
+  is(inputEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (input) #1");
+
+  is(windowEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by window #1");
+  is(windowEventData["compositionupdate"], "\u3089",
+     kDescription + "data of compositionupdate doesn't match (window) #1");
+  is(windowEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (window) #1");
+  is(inputEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by input #1");
+  is(inputEventData["compositionupdate"], "\u3089",
+     kDescription + "data of compositionupdate doesn't match (input) #1");
+  is(inputEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (input) #1");
+
+  is(windowEventCounts["compositionend"], 0,
+     kDescription + "compositionend has been handled by window #1");
+  is(inputEventCounts["compositionend"], 0,
+     kDescription + "compositionend has been handled by input #1");
+
+  synthesizeComposition({ type: "compositionupdate", data: "\u3089\u30FC" });
+  synthesizeText(
+    { "composition":
+      { "string": "\u3089\u30FC",
+        "clauses":
+        [
+          { "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
+        ]
+      },
+      "caret": { "start": 2, "length": 0 }
+    });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart has been handled more than once by window #2");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart has been handled more than once by input #2");
+
+  is(windowEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate hasn't been handled by window #2");
+  is(windowEventData["compositionupdate"], "\u3089\u30FC",
+     kDescription + "data of compositionupdate doesn't match (window) #2");
+  is(windowEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (window) #2");
+  is(inputEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate hasn't been handled by input #2");
+  is(inputEventData["compositionupdate"], "\u3089\u30FC",
+     kDescription + "data of compositionupdate doesn't match (input) #2");
+  is(inputEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (input) #2");
+
+  is(windowEventCounts["compositionend"], 0,
+     kDescription + "compositionend has been handled during composition by window #2");
+  is(inputEventCounts["compositionend"], 0,
+     kDescription + "compositionend has been handled during composition by input #2");
+
+  // text event shouldn't cause composition update, e.g., at committing.
+  synthesizeText(
+    { "composition":
+      { "string": "\u3089\u30FC",
+        "clauses":
+        [
+          { "length": 0, "attr": 0 }
+        ]
+      },
+      "caret": { "start": 2, "length": 0 }
+    });
+
+  synthesizeComposition({ type: "compositionend", data: "\u3089\u30FC" });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart has been handled more than once by window #3");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart has been handled more than once by input #3");
+
+  is(windowEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate has been fired unexpectedly on window #3");
+  is(inputEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate has been fired unexpectedly on input #3");
+
+  is(windowEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by window #3");
+  is(windowEventData["compositionend"], "\u3089\u30FC",
+     kDescription + "data of compositionend doesn't match (window) #3");
+  is(windowEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (window) #3");
+  is(inputEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by input #3");
+  is(inputEventData["compositionend"], "\u3089\u30FC",
+     kDescription + "data of compositionend doesn't match (input) #3");
+  is(inputEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (input) #3");
+
+  // 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": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeText(
+    { "composition":
+      { "string": "\u3089",
+        "clauses":
+        [
+          { "length": 0, "attr": 0 }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeComposition({ type: "compositionend", data: "\u3089" });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by window #4");
+  is(windowEventData["compositionstart"], "\u30FC",
+     kDescription + "data of compositionstart is empty (window) #4");
+  is(windowEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (window) #4");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by input #4");
+  is(inputEventData["compositionstart"], "\u30FC",
+     kDescription + "data of compositionstart is empty (input) #4");
+  is(inputEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (input) #4");
+
+  is(windowEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by window #4");
+  is(windowEventData["compositionupdate"], "\u3089",
+     kDescription + "data of compositionupdate doesn't match (window) #4");
+  is(windowEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (window) #4");
+  is(inputEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by input #4");
+  is(inputEventData["compositionupdate"], "\u3089",
+     kDescription + "data of compositionupdate doesn't match (input) #4");
+  is(inputEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (input) #4");
+
+  is(windowEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by window #4");
+  is(windowEventData["compositionend"], "\u3089",
+     kDescription + "data of compositionend doesn't match (window) #4");
+  is(windowEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (window) #4");
+  is(inputEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by input #4");
+  is(inputEventData["compositionend"], "\u3089",
+     kDescription + "data of compositionend doesn't match (input) #4");
+  is(inputEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (input) #4");
+
+  // 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": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeText(
+    { "composition":
+      { "string": "\u306D",
+        "clauses":
+        [
+          { "length": 0, "attr": 0 }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeComposition({ type: "compositionend", data: "\u306D" });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by window #5");
+  is(windowEventData["compositionstart"], "\u3089\u3089",
+     kDescription + "data of compositionstart is empty (window) #5");
+  is(windowEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (window) #5");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by input #5");
+  is(inputEventData["compositionstart"], "\u3089\u3089",
+     kDescription + "data of compositionstart is empty (input) #5");
+  is(inputEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty (input) #5");
+
+  is(windowEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by window #5");
+  is(windowEventData["compositionupdate"], "\u306D",
+     kDescription + "data of compositionupdate doesn't match (window) #5");
+  is(windowEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (window) #5");
+  is(inputEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by input #5");
+  is(inputEventData["compositionupdate"], "\u306D",
+     kDescription + "data of compositionupdate doesn't match (input) #5");
+  is(inputEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty (input) #5");
+
+  is(windowEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by window #5");
+  is(windowEventData["compositionend"], "\u306D",
+     kDescription + "data of compositionend doesn't match (window) #5");
+  is(windowEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (window) #5");
+  is(inputEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by input #5");
+  is(inputEventData["compositionend"], "\u306D",
+     kDescription + "data of compositionend doesn't match (input) #5");
+  is(inputEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty (input) #5");
+
+  prevnetDefault = false;
+
+  // 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": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeText(
+    { "composition":
+      { "string": "\u306E",
+        "clauses":
+        [
+          { "length": 0, "attr": 0 }
+        ]
+      },
+      "caret": { "start": 1, "length": 0 }
+    });
+
+  synthesizeComposition({ type: "compositionend", data: "\u306E" });
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by window #6");
+  is(windowEventData["compositionstart"], "\u306D",
+     kDescription + "data of compositionstart is empty #6");
+  is(windowEventLocale["compositionstart"], "",
+     kDescription + "locale of compositionstart isn't empty #6");
+  is(inputEventCounts["compositionstart"], 0,
+     kDescription + "compositionstart has been handled by input #6");
+
+  is(windowEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by window #6");
+  is(windowEventData["compositionupdate"], "\u306E",
+     kDescription + "data of compositionupdate doesn't match #6");
+  is(windowEventLocale["compositionupdate"], "",
+     kDescription + "locale of compositionupdate isn't empty #6");
+  is(inputEventCounts["compositionupdate"], 0,
+     kDescription + "compositionupdate has been handled by input #6");
+
+  is(windowEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by window #6");
+  is(windowEventData["compositionend"], "\u306E",
+     kDescription + "data of compositionend doesn't match #6");
+  is(windowEventLocale["compositionend"], "",
+     kDescription + "locale of compositionend isn't empty #6");
+  is(inputEventCounts["compositionend"], 0,
+     kDescription + "compositionend has been handled by input #6");
+
+  stopPropagation = false;
+
+  // create event and dispatch it.
+  initResults();
+
+  input.value = "value of input";
+  synthesizeKey("A", { accelKey: true }); // Select All
+
+  var compositionstart = document.createEvent("CompositionEvent");
+  compositionstart.initCompositionEvent("compositionstart",
+                                        true, true, document.defaultView,
+                                        "start data", "start locale");
+  is(compositionstart.type, "compositionstart",
+     kDescription + "type doesn't match #7");
+  is(compositionstart.data, "start data",
+     kDescription + "data doesn't match #7");
+  is(compositionstart.locale, "start locale",
+     kDescription + "locale doesn't match #7");
+  is(compositionstart.detail, 0,
+     kDescription + "detail isn't 0 #7");
+
+  input.dispatchEvent(compositionstart);
+
+  is(windowEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by window #7");
+  is(windowEventData["compositionstart"], "start data",
+     kDescription + "data of compositionstart was changed (window) #7");
+  is(windowEventLocale["compositionstart"], "start locale",
+     kDescription + "locale of compositionstart was changed (window) #7");
+  is(inputEventCounts["compositionstart"], 1,
+     kDescription + "compositionstart hasn't been handled by input #7");
+  is(inputEventData["compositionstart"], "start data",
+     kDescription + "data of compositionstart was changed (input) #7");
+  is(inputEventLocale["compositionstart"], "start locale",
+     kDescription + "locale of compositionstart was changed (input) #7");
+
+  is(input.value, "value of input",
+     kDescription + "input value was changed #7");
+
+  var compositionupdate1 = document.createEvent("compositionevent");
+  compositionupdate1.initCompositionEvent("compositionupdate",
+                                          true, false, document.defaultView,
+                                          "composing string", "composing locale");
+  is(compositionupdate1.type, "compositionupdate",
+     kDescription + "type doesn't match #8");
+  is(compositionupdate1.data, "composing string",
+     kDescription + "data doesn't match #8");
+  is(compositionupdate1.locale, "composing locale",
+     kDescription + "locale doesn't match #8");
+  is(compositionupdate1.detail, 0,
+     kDescription + "detail isn't 0 #8");
+
+  input.dispatchEvent(compositionupdate1);
+
+  is(windowEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by window #8");
+  is(windowEventData["compositionupdate"], "composing string",
+     kDescription + "data of compositionupdate was changed (window) #8");
+  is(windowEventLocale["compositionupdate"], "composing locale",
+     kDescription + "locale of compositionupdate was changed (window) #8");
+  is(inputEventCounts["compositionupdate"], 1,
+     kDescription + "compositionupdate hasn't been handled by input #8");
+  is(inputEventData["compositionupdate"], "composing string",
+     kDescription + "data of compositionupdate was changed (input) #8");
+  is(inputEventLocale["compositionupdate"], "composing locale",
+     kDescription + "locale of compositionupdate was changed (input) #8");
+
+  is(input.value, "value of input",
+     kDescription + "input value was changed #8");
+
+  var compositionupdate2 = document.createEvent("compositionEvent");
+  compositionupdate2.initCompositionEvent("compositionupdate",
+                                          true, false, document.defaultView,
+                                          "commit string", "commit locale");
+  is(compositionupdate2.type, "compositionupdate",
+     kDescription + "type doesn't match #9");
+  is(compositionupdate2.data, "commit string",
+     kDescription + "data doesn't match #9");
+  is(compositionupdate2.locale, "commit locale",
+     kDescription + "locale doesn't match #9");
+  is(compositionupdate2.detail, 0,
+     kDescription + "detail isn't 0 #9");
+
+  input.dispatchEvent(compositionupdate2);
+
+  is(windowEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate hasn't been handled by window #9");
+  is(windowEventData["compositionupdate"], "commit string",
+     kDescription + "data of compositionupdate was changed (window) #9");
+  is(windowEventLocale["compositionupdate"], "commit locale",
+     kDescription + "locale of compositionupdate was changed (window) #9");
+  is(inputEventCounts["compositionupdate"], 2,
+     kDescription + "compositionupdate hasn't been handled by input #9");
+  is(inputEventData["compositionupdate"], "commit string",
+     kDescription + "data of compositionupdate was changed (input) #9");
+  is(inputEventLocale["compositionupdate"], "commit locale",
+     kDescription + "locale of compositionupdate was changed (input) #9");
+
+  is(input.value, "value of input",
+     kDescription + "input value was changed #9");
+
+  var compositionend = document.createEvent("Compositionevent");
+  compositionend.initCompositionEvent("compositionend",
+                                      true, false, document.defaultView,
+                                      "end data", "end locale");
+  is(compositionend.type, "compositionend",
+     kDescription + "type doesn't match #10");
+  is(compositionend.data, "end data",
+     kDescription + "data doesn't match #10");
+  is(compositionend.locale, "end locale",
+     kDescription + "locale doesn't match #10");
+  is(compositionend.detail, 0,
+     kDescription + "detail isn't 0 #10");
+
+  input.dispatchEvent(compositionend);
+
+  is(windowEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by window #10");
+  is(windowEventData["compositionend"], "end data",
+     kDescription + "data of compositionend was changed (window) #10");
+  is(windowEventLocale["compositionend"], "end locale",
+     kDescription + "locale of compositionend was changed (window) #10");
+  is(inputEventCounts["compositionend"], 1,
+     kDescription + "compositionend hasn't been handled by input #10");
+  is(inputEventData["compositionend"], "end data",
+     kDescription + "data of compositionend was changed (input) #10");
+  is(inputEventLocale["compositionend"], "end locale",
+     kDescription + "locale of compositionend was changed (input) #10");
+
+  is(input.value, "value of input",
+     kDescription + "input value was changed #10");
+
+  window.removeEventListener("compositionstart",
+                             compositionEventHandlerForWindow, true);
+  window.removeEventListener("compositionend",
+                             compositionEventHandlerForWindow, true);
+  window.removeEventListener("compositionupdate",
+                             compositionEventHandlerForWindow, true);
+
+  input.removeEventListener("compositionstart",
+                            compositionEventHandlerForInput, true);
+  input.removeEventListener("compositionend",
+                            compositionEventHandlerForInput, true);
+  input.removeEventListener("compositionupdate",
+                            compositionEventHandlerForInput, true);
+}
+
 function runCharAtPointTest(aFocusedEditor, aTargetName)
 {
   aFocusedEditor.value = "This is a test of the\nContent Events";
                        // 012345678901234567890  12345678901234
                        // 0         1         2           3    
 
+  aFocusedEditor.focus();
+
   const kLFLen = kIsWin ? 2 : 1;
 
   const kNone = -1;
   const kTestingOffset   = [     0, 10,    20, 21 + kLFLen, 34 + kLFLen];
   const kLeftSideOffset  = [ kNone,  9,    19,       kNone, 33 + kLFLen];
   const kRightSideOffset = [     1, 11, kNone, 22 + kLFLen,       kNone];
 
   var editorRect = synthesizeQueryEditorRect();
@@ -1786,16 +2324,17 @@ function runMaxLengthTest()
     return;
   }
 }
 
 function runTest()
 {
   runUndoRedoTest();
   runCompositionTest();
+  runCompositionEventTest();
   runCharAtPointTest(textarea, "textarea in the document");
   runCharAtPointAtOutsideTest();
   runFrameTest();
   runPanelTest();
   runMaxLengthTest();
 }
 
 ]]>