Bug 999550 - Make check for B2G backwards compatible with Gecko 28 branch. r=bsilverberg
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 25 Apr 2014 07:47:00 -0400
changeset 180584 27f06ab0845463af85af757260a377c8808a76d9
parent 180583 507d6e8a8f5ad7406f1283919866ee80c7021a2e
child 180585 f97d1a5bbd67094785096356371327b38a859e53
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersbsilverberg
bugs999550
milestone31.0a1
Bug 999550 - Make check for B2G backwards compatible with Gecko 28 branch. r=bsilverberg
testing/marionette/client/marionette/runner/base.py
--- a/testing/marionette/client/marionette/runner/base.py
+++ b/testing/marionette/client/marionette/runner/base.py
@@ -246,17 +246,17 @@ class MarionetteTextTestRunner(unittest.
 
     def __init__(self, **kwargs):
         self.marionette = kwargs['marionette']
         self.capabilities = kwargs.pop('capabilities')
         self.pre_run_functions = []
         self.b2g_pid = None
         del kwargs['marionette']
 
-        if self.capabilities['device'] != 'desktop' and self.capabilities['b2g']:
+        if self.capabilities["device"] != "desktop" and self.capabilities["browserName"] == "B2G":
             def b2g_pre_run():
                 dm_type = os.environ.get('DM_TRANS', 'adb')
                 if dm_type == 'adb':
                     self.b2g_pid = get_b2g_pid(get_dm(self.marionette))
             self.pre_run_functions.append(b2g_pre_run)
 
         unittest.TextTestRunner.__init__(self, **kwargs)