diff --git a/testing/marionette/client/marionette/emulator.py b/testing/marionette/client/marionette/emulator.py index 396082b417e1..c94ad14b2a44 100644 --- a/testing/marionette/client/marionette/emulator.py +++ b/testing/marionette/client/marionette/emulator.py @@ -306,6 +306,9 @@ class Emulator(object): online, offline = self._get_adb_devices() self.port = int(list(online - original_online)[0]) self._emulator_launched = True + + # bug 802877 + time.sleep(10) self.geo.set_default_location() if self.logcat_dir: diff --git a/testing/marionette/client/marionette/marionette_test.py b/testing/marionette/client/marionette/marionette_test.py index bdc07a84fb95..6e21ab7a0548 100644 --- a/testing/marionette/client/marionette/marionette_test.py +++ b/testing/marionette/client/marionette/marionette_test.py @@ -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 = [] diff --git a/testing/marionette/marionette-actors.js b/testing/marionette/marionette-actors.js index 14bb36cd64ed..7b2953f1a5e9 100644 --- a/testing/marionette/marionette-actors.js +++ b/testing/marionette/marionette-actors.js @@ -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); diff --git a/testing/mochitest/b2g.json b/testing/mochitest/b2g.json new file mode 100644 index 000000000000..cf7db60a0a04 --- /dev/null +++ b/testing/mochitest/b2g.json @@ -0,0 +1,9 @@ +{ +"runtests": { + "dom/tests/mochitest/dom-level0": "", + "dom/tests/mochitest/dom-level1-core": "", + "dom/tests/mochitest/dom-level2-core": "", + "dom/tests/mochitest/dom-level2-html": "" + }, +"excludetests": {} +} diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index f8c97fc301aa..13f1421edc21 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -32,6 +32,7 @@ #include "nsNPAPIPluginInstance.h" #include "nsThemeConstants.h" #include "nsIWidgetListener.h" +#include "nsIPresShell.h" #include "nsDragService.h" #include "nsClipboard.h"