mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 793213 - Disable offline mode for b2g mochitest/reftest, r=ahal, DONTBUILD because NPOTB
This commit is contained in:
parent
03c0d80db3
commit
d1923e5084
@ -246,7 +246,21 @@ class B2GRemoteAutomation(Automation):
|
||||
if 'b2g' not in session:
|
||||
raise Exception("bad session value %s returned by start_session" % session)
|
||||
|
||||
if self.context_chrome:
|
||||
if self._is_emulator:
|
||||
# Disable offline status management (bug 777145), otherwise the network
|
||||
# will be 'offline' when the mochitests start. Presumably, the network
|
||||
# won't be offline on a real device, so we only do this for emulators.
|
||||
self.marionette.set_context(self.marionette.CONTEXT_CHROME)
|
||||
self.marionette.execute_script("""
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.io.manageOfflineStatus = false;
|
||||
Services.io.offline = false;
|
||||
""")
|
||||
|
||||
if not self.context_chrome:
|
||||
self.marionette.set_context(self.marionette.CONTEXT_CONTENT)
|
||||
|
||||
elif self.context_chrome:
|
||||
self.marionette.set_context(self.marionette.CONTEXT_CHROME)
|
||||
|
||||
# start the tests
|
||||
|
Loading…
Reference in New Issue
Block a user