Backout 9252522aab90, r=bustage

This commit is contained in:
Jonathan Griffin 2012-11-30 12:54:00 -08:00
Родитель 0419d82de3
Коммит d5cd2613c8
4 изменённых файлов: 11 добавлений и 21 удалений

Просмотреть файл

@ -406,7 +406,6 @@ user_pref("reftest.browser.iframe.enabled", true);
user_pref("reftest.remote", true); user_pref("reftest.remote", true);
user_pref("reftest.uri", "%s"); user_pref("reftest.uri", "%s");
user_pref("toolkit.telemetry.prompted", true); user_pref("toolkit.telemetry.prompted", true);
user_pref("marionette.loadearly", true);
""" % reftestlist) """ % reftestlist)
#workaround for jsreftests. #workaround for jsreftests.

Просмотреть файл

@ -330,11 +330,11 @@ waitFor(
def add_prefs_to_profile(self, prefs=None): def add_prefs_to_profile(self, prefs=None):
if not prefs: if not prefs:
prefs = ['user_pref("marionette.loadearly", true);'] prefs = ["user_pref('marionette.loadearly', true);"]
local_user_js = tempfile.mktemp(prefix='localuserjs') local_user_js = tempfile.mktemp(prefix='localuserjs')
self.dm.getFile(self.remote_user_js, local_user_js) self.dm.getFile(self.remote_user_js, local_user_js)
with open(local_user_js, 'a') as f: with open(local_user_js, 'a') as f:
f.write('%s\n' % '\n'.join(prefs)) f.write('/n'.join(prefs))
self.dm.pushFile(local_user_js, self.remote_user_js) self.dm.pushFile(local_user_js, self.remote_user_js)
def start(self): def start(self):
@ -379,6 +379,10 @@ waitFor(
self._run_adb(['shell', 'setprop', 'net.dns1', '10.0.2.3']) self._run_adb(['shell', 'setprop', 'net.dns1', '10.0.2.3'])
def setup(self, marionette, gecko_path=None, load_early=False): def setup(self, marionette, gecko_path=None, load_early=False):
# Wait for the system-message-listener-ready event, otherwise
# Bad Things happen.
self.wait_for_system_message(marionette)
if gecko_path: if gecko_path:
if load_early: if load_early:
# Inject prefs into the profile now, since we have to restart # Inject prefs into the profile now, since we have to restart
@ -389,7 +393,9 @@ waitFor(
self.add_prefs_to_profile() self.add_prefs_to_profile()
self.restart_b2g() self.restart_b2g()
if load_early: #if load_early:
# Temporarily enable this always until part 2 of bug 815807 lands
if True:
# If we're loading early, we have to wait for the # If we're loading early, we have to wait for the
# system-message-listener-ready event again after restarting B2G. # system-message-listener-ready event again after restarting B2G.
# If we're not loading early, we skip this because Marionette # If we're not loading early, we skip this because Marionette

Просмотреть файл

@ -8,7 +8,6 @@ const MARIONETTE_CONTRACTID = "@mozilla.org/marionette;1";
const MARIONETTE_CID = Components.ID("{786a1369-dca5-4adc-8486-33d23c88010a}"); const MARIONETTE_CID = Components.ID("{786a1369-dca5-4adc-8486-33d23c88010a}");
const DEBUGGER_ENABLED_PREF = 'devtools.debugger.remote-enabled'; const DEBUGGER_ENABLED_PREF = 'devtools.debugger.remote-enabled';
const MARIONETTE_ENABLED_PREF = 'marionette.defaultPrefs.enabled'; const MARIONETTE_ENABLED_PREF = 'marionette.defaultPrefs.enabled';
const MARIONETTE_LOADEARLY_PREF = 'marionette.loadearly';
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Services.jsm");
@ -40,34 +39,21 @@ MarionetteComponent.prototype = {
switch (aTopic) { switch (aTopic) {
case "profile-after-change": case "profile-after-change":
let enabled = false; let enabled = false;
let loadearly = false;
try { try {
enabled = Services.prefs.getBoolPref(MARIONETTE_ENABLED_PREF); enabled = Services.prefs.getBoolPref(MARIONETTE_ENABLED_PREF);
loadearly = Services.prefs.getBoolPref(MARIONETTE_LOADEARLY_PREF);
} catch(e) {} } catch(e) {}
if (enabled) { if (enabled) {
this.logger.info("marionette enabled, loadearly: " + loadearly); this.logger.info("marionette enabled");
//add observers //add observers
if (loadearly) { observerService.addObserver(this, "final-ui-startup", false);
observerService.addObserver(this, "final-ui-startup", false);
}
else {
observerService.addObserver(this, "system-message-listener-ready", false);
}
observerService.addObserver(this, "xpcom-shutdown", false); observerService.addObserver(this, "xpcom-shutdown", false);
} }
else { else {
this.logger.info("marionette not enabled"); this.logger.info("marionette not enabled");
} }
break; break;
case "system-message-listener-ready":
this.logger.info("marionette initializing at system-message-listener-ready");
observerService.removeObserver(this, "system-message-listener-ready");
this.init();
break;
case "final-ui-startup": case "final-ui-startup":
this.logger.info("marionette initializing at final-ui-startup");
observerService.removeObserver(this, "final-ui-startup"); observerService.removeObserver(this, "final-ui-startup");
this.init(); this.init();
break; break;

Просмотреть файл

@ -429,7 +429,6 @@ user_pref("dom.ipc.tabs.disabled", false);
user_pref("dom.ipc.browser_frames.oop_by_default", false); user_pref("dom.ipc.browser_frames.oop_by_default", false);
user_pref("dom.mozBrowserFramesWhitelist","app://test-container.gaiamobile.org,http://mochi.test:8888"); user_pref("dom.mozBrowserFramesWhitelist","app://test-container.gaiamobile.org,http://mochi.test:8888");
user_pref("network.dns.localDomains","app://test-container.gaiamobile.org"); user_pref("network.dns.localDomains","app://test-container.gaiamobile.org");
user_pref("marionette.loadearly", true);
""") """)
f.close() f.close()