Bug 1105748 - Fix Mn failure on emulator/device, r=dburns

This commit is contained in:
Malini Das 2014-12-04 10:02:32 -08:00
parent f234316b4b
commit ab425be28a
3 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,8 @@ def expectedFailure(func):
def skip_if_b2g(target):
def wrapper(self, *args, **kwargs):
if not self.marionette.session_capabilities['device'] == 'qemu':
if self.marionette.session_capabilities.has_key('b2g') and \
not self.marionette.session_capabilities['b2g'] == True:
return target(self, *args, **kwargs)
else:
raise SkipTest('skipping due to b2g')

View File

@ -667,7 +667,7 @@ if((navigator.mozSettings == undefined) || (navigator.mozSettings == null) || (n
let setReq = navigator.mozSettings.createLock().set({'lockscreen.enabled': false});
setReq.onsuccess = function() {
let appName = 'Test Container';
let activeApp = window.wrappedJSObject.System.currentApp;
let activeApp = window.wrappedJSObject.Service.currentApp;
// if the Test Container is already open then do nothing
if(activeApp.name === appName){

View File

@ -14,6 +14,7 @@ class TestNavigate(MarionetteTestCase):
self.assertNotEqual("about:blank", self.marionette.execute_script("return window.location.href;"))
self.assertEqual("Marionette Test", self.marionette.title)
@skip_if_b2g # we currently allow this in b2g
def test_navigate_chrome_error(self):
with self.marionette.using_context("chrome"):
self.assertRaisesRegexp(MarionetteException, "Cannot navigate in chrome context",