зеркало из https://github.com/mozilla/gecko-dev.git
Bug 777871 - Get mochitests running OOP in B2G, r=jlebar, DONTBUILD because NPOTB
This commit is contained in:
Родитель
9b5831023c
Коммит
eceb527930
|
@ -211,8 +211,11 @@ class B2GRemoteAutomation(Automation):
|
|||
if 'b2g' not in session:
|
||||
raise Exception("bad session value %s returned by start_session" % session)
|
||||
|
||||
# start the tests by navigating to the mochitest url
|
||||
self.marionette.execute_script("window.location.href='%s';" % self.testURL)
|
||||
# Start the tests by navigating to the mochitest url, by setting it
|
||||
# as the 'src' attribute to the homescreen mozbrowser element
|
||||
# provided by B2G's shell.js.
|
||||
self.marionette.set_context("chrome")
|
||||
self.marionette.execute_script("document.getElementById('homescreen').src='%s';" % self.testURL)
|
||||
|
||||
return instance
|
||||
|
||||
|
|
|
@ -355,10 +355,17 @@ class B2GMochitest(Mochitest):
|
|||
testURL += "?" + "&".join(self.urlOpts)
|
||||
self._automation.testURL = testURL
|
||||
|
||||
# Set the B2G homepage as a static local page, since wi-fi generally
|
||||
# isn't available as soon as the device boots.
|
||||
# Set extra prefs for B2G.
|
||||
f = open(os.path.join(options.profilePath, "user.js"), "a")
|
||||
f.write('user_pref("browser.homescreenURL", "data:text/html,<h1>mochitest-plain should start soon</h1>");\n')
|
||||
f.write("""
|
||||
user_pref("browser.homescreenURL","app://system.gaiamobile.org");\n
|
||||
user_pref("dom.mozBrowserFramesEnabled", true);\n
|
||||
user_pref("dom.ipc.tabs.disabled", false);\n
|
||||
user_pref("dom.ipc.browser_frames.oop_by_default", true);\n
|
||||
user_pref("browser.manifestURL","app://system.gaiamobile.org/manifest.webapp");\n
|
||||
user_pref("dom.mozBrowserFramesWhitelist","app://system.gaiamobile.org,http://mochi.test:8888");\n
|
||||
user_pref("network.dns.localDomains","app://system.gaiamobile.org");\n
|
||||
""")
|
||||
f.close()
|
||||
|
||||
# Copy the profile to the device.
|
||||
|
|
Загрузка…
Ссылка в новой задаче