mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 9252522aab90, r=bustage
This commit is contained in:
parent
12de3548e2
commit
2e70a34fa0
@ -406,7 +406,6 @@ user_pref("reftest.browser.iframe.enabled", true);
|
||||
user_pref("reftest.remote", true);
|
||||
user_pref("reftest.uri", "%s");
|
||||
user_pref("toolkit.telemetry.prompted", true);
|
||||
user_pref("marionette.loadearly", true);
|
||||
""" % reftestlist)
|
||||
|
||||
#workaround for jsreftests.
|
||||
|
@ -330,11 +330,11 @@ waitFor(
|
||||
|
||||
def add_prefs_to_profile(self, prefs=None):
|
||||
if not prefs:
|
||||
prefs = ['user_pref("marionette.loadearly", true);']
|
||||
prefs = ["user_pref('marionette.loadearly', true);"]
|
||||
local_user_js = tempfile.mktemp(prefix='localuserjs')
|
||||
self.dm.getFile(self.remote_user_js, local_user_js)
|
||||
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)
|
||||
|
||||
def start(self):
|
||||
@ -379,6 +379,10 @@ waitFor(
|
||||
self._run_adb(['shell', 'setprop', 'net.dns1', '10.0.2.3'])
|
||||
|
||||
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 load_early:
|
||||
# Inject prefs into the profile now, since we have to restart
|
||||
@ -389,7 +393,9 @@ waitFor(
|
||||
self.add_prefs_to_profile()
|
||||
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
|
||||
# system-message-listener-ready event again after restarting B2G.
|
||||
# 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 DEBUGGER_ENABLED_PREF = 'devtools.debugger.remote-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/Services.jsm");
|
||||
@ -40,34 +39,21 @@ MarionetteComponent.prototype = {
|
||||
switch (aTopic) {
|
||||
case "profile-after-change":
|
||||
let enabled = false;
|
||||
let loadearly = false;
|
||||
try {
|
||||
enabled = Services.prefs.getBoolPref(MARIONETTE_ENABLED_PREF);
|
||||
loadearly = Services.prefs.getBoolPref(MARIONETTE_LOADEARLY_PREF);
|
||||
} catch(e) {}
|
||||
if (enabled) {
|
||||
this.logger.info("marionette enabled, loadearly: " + loadearly);
|
||||
this.logger.info("marionette enabled");
|
||||
|
||||
//add observers
|
||||
if (loadearly) {
|
||||
observerService.addObserver(this, "final-ui-startup", false);
|
||||
}
|
||||
else {
|
||||
observerService.addObserver(this, "system-message-listener-ready", false);
|
||||
}
|
||||
observerService.addObserver(this, "final-ui-startup", false);
|
||||
observerService.addObserver(this, "xpcom-shutdown", false);
|
||||
}
|
||||
else {
|
||||
this.logger.info("marionette not enabled");
|
||||
}
|
||||
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":
|
||||
this.logger.info("marionette initializing at final-ui-startup");
|
||||
observerService.removeObserver(this, "final-ui-startup");
|
||||
this.init();
|
||||
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.mozBrowserFramesWhitelist","app://test-container.gaiamobile.org,http://mochi.test:8888");
|
||||
user_pref("network.dns.localDomains","app://test-container.gaiamobile.org");
|
||||
user_pref("marionette.loadearly", true);
|
||||
""")
|
||||
f.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user