Bug 1258921 - Follow-up to enable test_basic_form_autocomplete.html for e10s
☠☠ backed out by 59fe5c482a55 ☠ ☠
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 19 Apr 2016 11:45:49 -0700
changeset 331638 07e1879a0c098301e5918c4b9cdea299a5fc7265
parent 331637 3b3c1809c8be95512093a3cf19d1a35e99ad145c
child 331639 7120b9fe3f8386a05a1359868355eb9700e669ae
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1258921
milestone48.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 1258921 - Follow-up to enable test_basic_form_autocomplete.html for e10s MozReview-Commit-ID: 32y9BhVomwr
toolkit/components/passwordmgr/test/mochitest/mochitest.ini
toolkit/components/passwordmgr/test/pwmgr_common.js
--- a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
+++ b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
@@ -11,17 +11,17 @@ support-files =
 [test_basic_form.html]
 [test_basic_form_0pw.html]
 [test_basic_form_1pw.html]
 [test_basic_form_1pw_2.html]
 [test_basic_form_2pw_1.html]
 [test_basic_form_2pw_2.html]
 [test_basic_form_3pw_1.html]
 [test_basic_form_autocomplete.html]
-skip-if = toolkit == 'android' || e10s # android:autocomplete. e10s:Requires code fix in bug 1258921.
+skip-if = toolkit == 'android' # android:autocomplete.
 [test_basic_form_html5.html]
 [test_basic_form_pwevent.html]
 [test_basic_form_pwonly.html]
 [test_bug_627616.html]
 skip-if = toolkit == 'android' # Tests desktop prompts
 [test_bug_776171.html]
 [test_case_differences.html]
 skip-if = toolkit == 'android' # autocomplete
--- a/toolkit/components/passwordmgr/test/pwmgr_common.js
+++ b/toolkit/components/passwordmgr/test/pwmgr_common.js
@@ -299,25 +299,25 @@ function resetRecipes() {
       resolve();
     });
     chromeScript.sendAsyncMessage("resetRecipes");
   });
 }
 
 function promiseStorageChanged(expectedChangeTypes) {
   return new Promise((resolve, reject) => {
-    let onStorageChanged = SpecialPowers.wrapCallback(function osc(subject, topic, data) {
+    function onStorageChanged({ topic, data }) {
       let changeType = expectedChangeTypes.shift();
       is(data, changeType, "Check expected passwordmgr-storage-changed type");
       if (expectedChangeTypes.length === 0) {
-        SpecialPowers.removeObserver(onStorageChanged, "passwordmgr-storage-changed");
-        resolve(subject);
+        chromeScript.removeMessageListener("storageChanged", onStorageChanged);
+        resolve();
       }
-    });
-    SpecialPowers.addObserver(onStorageChanged, "passwordmgr-storage-changed", false);
+    }
+    chromeScript.addMessageListener("storageChanged", onStorageChanged);
   });
 }
 
 function countLogins(chromeScript, formOrigin, submitOrigin, httpRealm) {
   return chromeScript.sendSyncMessage("countLogins", {formOrigin, submitOrigin, httpRealm})[0][0];
 }
 
 /**
@@ -357,16 +357,24 @@ if (this.addMessageListener) {
   var SpecialPowers = { Cc, Ci, Cr, Cu, };
   var ok, is;
   // Ignore ok/is in commonInit since they aren't defined in a chrome script.
   ok = is = () => {}; // eslint-disable-line no-native-reassign
 
   Cu.import("resource://gre/modules/Services.jsm");
   Cu.import("resource://gre/modules/Task.jsm");
 
+  function onStorageChanged(subject, topic, data) {
+    sendAsyncMessage("storageChanged", {
+      topic,
+      data,
+    });
+  }
+  Services.obs.addObserver(onStorageChanged, "passwordmgr-storage-changed", false);
+
   addMessageListener("setupParent", ({selfFilling = false} = {selfFilling: false}) => {
     commonInit(selfFilling);
     sendAsyncMessage("doneSetup");
   });
 
   addMessageListener("loadRecipes", Task.async(function* loadRecipes(recipes) {
     var { LoginManagerParent } = Cu.import("resource://gre/modules/LoginManagerParent.jsm", {});
     var recipeParent = yield LoginManagerParent.recipeParentPromise;