Bug 1288863: Update Firefox Puppeteer to use lower case platformName r=whimboo
authorDavid Burns <dburns@mozilla.com>
Thu, 28 Jul 2016 16:25:42 +0100
changeset 307964 6fccb3cdd76332b351eb8da6d1d91a0129d6b022
parent 307963 6f7e63905686b35f0b4fa54721d4529974a7fe80
child 307965 9a3134f679a4b595b2a6605f34760376d22ab3b6
push id30524
push userkwierso@gmail.com
push dateWed, 03 Aug 2016 21:02:04 +0000
treeherdermozilla-central@de6fd5bb93d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1288863
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288863: Update Firefox Puppeteer to use lower case platformName r=whimboo The capabilities, according to the webdriver specification, should all be lowercase. MozReview-Commit-ID: BKBqsi0kQh1
testing/puppeteer/firefox/firefox_puppeteer/__init__.py
testing/puppeteer/firefox/firefox_puppeteer/api/keys.py
testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py
--- a/testing/puppeteer/firefox/firefox_puppeteer/__init__.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/__init__.py
@@ -61,17 +61,17 @@ class Puppeteer(object):
         """
 
     @property
     def platform(self):
         """Returns the lowercased platform name.
 
         :returns: Platform name
         """
-        return self.marionette.session_capabilities['platformName'].lower()
+        return self.marionette.session_capabilities['platformName']
 
     @use_class_as_property('api.prefs.Preferences')
     def prefs(self):
         """
         Provides an api for setting and inspecting preferences, as see in
         about:config.
 
         See the :class:`~api.prefs.Preferences` reference.
--- a/testing/puppeteer/firefox/firefox_puppeteer/api/keys.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/api/keys.py
@@ -8,13 +8,13 @@ import marionette_driver
 class Keys(marionette_driver.keys.Keys):
     """Proxy to marionette's keys with an "accel" provided for convenience
     testing across platforms."""
 
     def __init__(self, marionette_getter):
         self.marionette_getter = marionette_getter
 
         caps = self.marionette_getter().session_capabilities
-        self.isDarwin = caps['platformName'] == 'DARWIN'
+        self.isDarwin = caps['platformName'] == 'darwin'
 
     @property
     def ACCEL(self):
         return self.META if self.isDarwin else self.CONTROL
--- a/testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py
@@ -393,17 +393,17 @@ class BaseWindow(BaseLib):
         :param ctrl: Optional, If `True`, the `Ctrl` modifier key is pressed. Defaults to `False`.
 
         :param meta: Optional, If `True`, the `Meta` modifier key is pressed. Defaults to `False`.
 
         :param shift: Optional, If `True`, the `Shift` modifier key is pressed.
          Defaults to `False`.
         """
 
-        platform = self.marionette.session_capabilities['platformName'].lower()
+        platform = self.marionette.session_capabilities['platformName']
 
         keymap = {
             'accel': Keys.META if platform == 'darwin' else Keys.CONTROL,
             'alt': Keys.ALT,
             'cmd': Keys.COMMAND,
             'ctrl': Keys.CONTROL,
             'meta': Keys.META,
             'shift': Keys.SHIFT,