Bug 917322 part.22 Fix new orange which was caused by bug 1115616 r=smaug draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 27 Jan 2015 14:13:55 +0900
changeset 366455 7b74c24d60c21ec80082dbfd00a4d0f449afca65
parent 366454 0ec0e6579e5e7182ea5295c2e5463ceb13c78890
child 366456 fd6a1328d203fa78a5514971b27c1fcfee234961
push id50874
push usermasayuki@d-toybox.com
push dateTue, 27 Jan 2015 05:37:46 +0000
treeherdertry@fd6a1328d203 [default view] [failures only]
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,26 @@ 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);
   },