Bug 917322 part.22 Fix new orange which was caused by bug 1115616 r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 28 Jan 2015 15:27:33 +0900
changeset 239593 b5d2f8341db40b0624320738ba731f03966ecd9a
parent 239592 9b6ed23707175cef3dec02139ace88eb264072c0
child 239594 8d063686d243f74077828c4ffe6721d62f8e0811
push id500
push userjoshua.m.grant@gmail.com
push dateThu, 29 Jan 2015 01:48:36 +0000
reviewerssmaug
bugs917322, 1115616
milestone38.0a1
Bug 917322 part.22 Fix new orange which was caused by bug 1115616 r=smaug
browser/base/content/test/general/browser_aboutHome.js
browser/base/content/test/general/browser_searchSuggestionUI.js
browser/base/content/test/general/searchSuggestionUI.js
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -384,27 +384,27 @@ let gTests = [
   desc: "Clicking suggestion list while composing",
   setup: function() {},
   run: function()
   {
     return Task.spawn(function* () {
       // Start composition and type "x"
       let input = gBrowser.contentDocument.getElementById("searchText");
       input.focus();
-      EventUtils.synthesizeComposition({ type: "compositionstart", data: "" });
-      EventUtils.synthesizeComposition({ type: "compositionupdate", data: "x" });
+      EventUtils.synthesizeComposition({ type: "compositionstart", data: "" },
+                                       gBrowser.contentWindow);
       EventUtils.synthesizeCompositionChange({
         composition: {
           string: "x",
           clauses: [
-            { length: 1, attr: EventUtils.COMPOSITION_ATTR_RAWINPUT }
+            { length: 1, attr: EventUtils.COMPOSITION_ATTR_RAW_CLAUSE }
           ]
         },
         caret: { start: 1, length: 0 }
-      });
+      }, gBrowser.contentWindow);
 
       // Wait for the search suggestions to become visible.
       let table =
         gBrowser.contentDocument.getElementById("searchSuggestionTable");
       let deferred = Promise.defer();
       let observer = new MutationObserver(() => {
         if (input.getAttribute("aria-expanded") == "true") {
           observer.disconnect();
--- a/browser/base/content/test/general/browser_searchSuggestionUI.js
+++ b/browser/base/content/test/general/browser_searchSuggestionUI.js
@@ -187,18 +187,16 @@ add_task(function* formHistory() {
   yield msg("reset");
 });
 
 add_task(function* composition() {
   yield setUp();
 
   let state = yield msg("startComposition", { data: "" });
   checkState(state, "", [], -1);
-  state = yield msg("updateComposition", { data: "x" });
-  checkState(state, "", [], -1);
   state = yield msg("changeComposition", { data: "x", waitForSuggestions: true });
   checkState(state, "x", ["xfoo", "xbar"], -1);
 
   // Mouse over the first suggestion.
   state = yield msg("mousemove", 0);
   checkState(state, "x", ["xfoo", "xbar"], 0);
 
   // Mouse over the second suggestion.
--- a/browser/base/content/test/general/searchSuggestionUI.js
+++ b/browser/base/content/test/general/searchSuggestionUI.js
@@ -23,34 +23,27 @@ let messageHandlers = {
   key: function (arg) {
     let keyName = typeof(arg) == "string" ? arg : arg.key;
     content.synthesizeKey(keyName, {});
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack);
   },
 
   startComposition: function (arg) {
-    let data = typeof(arg) == "string" ? arg : arg.data;
-    content.synthesizeComposition({ type: "compositionstart", data: data });
-    ack();
-  },
-
-  updateComposition: function (arg) {
-    let data = typeof(arg) == "string" ? arg : arg.data;
-    content.synthesizeComposition({ type: "compositionupdate", data: data });
+    content.synthesizeComposition({ type: "compositionstart", data: "" });
     ack();
   },
 
   changeComposition: function (arg) {
     let data = typeof(arg) == "string" ? arg : arg.data;
     content.synthesizeCompositionChange({
       composition: {
         string: data,
         clauses: [
-          { length: data.length, attr: content.COMPOSITION_ATTR_RAWINPUT }
+          { length: data.length, attr: content.COMPOSITION_ATTR_RAW_CLAUSE }
         ]
       },
       caret: { start: data.length, length: 0 }
     });
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack);
   },