mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 11:28:38 +00:00
Bug 802807 - Only listen for system-message-listener-ready for JS tests, r=mdas, DONTBUILD(NPOTB)
This commit is contained in:
parent
b7f17599ce
commit
45e0ce533b
@ -159,6 +159,17 @@ class MarionetteJSTestCase(CommonTestCase):
|
||||
if self.marionette.session is None:
|
||||
self.marionette.start_session()
|
||||
self.marionette.execute_script("log('TEST-START: %s');" % self.jsFile.replace('\\', '\\\\'))
|
||||
|
||||
self.marionette.set_context(self.marionette.CONTEXT_CHROME)
|
||||
self.marionette.set_script_timeout(30000)
|
||||
self.marionette.execute_async_script("""
|
||||
waitFor(
|
||||
function() { marionetteScriptFinished(true); },
|
||||
function() { return isSystemMessageListenerReady(); }
|
||||
);
|
||||
""")
|
||||
self.marionette.set_context(self.marionette.CONTEXT_CONTENT)
|
||||
|
||||
f = open(self.jsFile, 'r')
|
||||
js = f.read()
|
||||
args = []
|
||||
|
@ -449,8 +449,7 @@ MarionetteDriverActor.prototype = {
|
||||
let win = this.getCurrentWindow();
|
||||
if (!win ||
|
||||
(appName == "Firefox" && !win.gBrowser) ||
|
||||
(appName == "Fennec" && !win.BrowserApp) ||
|
||||
(appName == "B2G" && !systemMessageListenerReady)) {
|
||||
(appName == "Fennec" && !win.BrowserApp)) {
|
||||
checkTimer.initWithCallback(waitForWindow.bind(this), 100, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
else {
|
||||
@ -606,6 +605,9 @@ MarionetteDriverActor.prototype = {
|
||||
}
|
||||
});
|
||||
|
||||
_chromeSandbox.isSystemMessageListenerReady =
|
||||
function() { return systemMessageListenerReady; }
|
||||
|
||||
if (specialPowers == true) {
|
||||
loader.loadSubScript("chrome://specialpowers/content/specialpowersAPI.js",
|
||||
_chromeSandbox);
|
||||
|
Loading…
Reference in New Issue
Block a user