Bug 1317462 - Remove platform capability from Marionette; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 15 Nov 2016 00:31:05 +0000
changeset 441649 4e7e6eb25fbbff5746be6bb993bec76e04f31b15
parent 441648 e517e66ad07c568b1de3dd7121fbfb457db65730
child 441650 b837d28cde067d39956d4fac8f802840aa40bff8
push id36480
push userbmo:ato@mozilla.com
push dateSun, 20 Nov 2016 15:04:40 +0000
reviewersautomatedtester
bugs1317462
milestone53.0a1
Bug 1317462 - Remove platform capability from Marionette; r?automatedtester MozReview-Commit-ID: FKdRazfHHJG
testing/marionette/driver.js
testing/marionette/harness/marionette/tests/unit/test_capabilities.py
testing/puppeteer/firefox/firefox_puppeteer/ui/browser/window.py
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -142,19 +142,16 @@ this.GeckoDriver = function(appName, ser
     // supported features
     "raisesAccessibilityExceptions": false,
     "rotatable": this.appName == "B2G",
     "acceptSslCerts": false,
     "takesElementScreenshot": true,
     "takesScreenshot": true,
     "proxy": {},
 
-    // Selenium 2 compat
-    "platform": Services.sysinfo.getProperty("name").toUpperCase(),
-
     // proprietary extensions
     "processId" : Services.appinfo.processID,
   };
 
   this.mm = globalMessageManager;
   this.listener = proxy.toListener(() => this.mm, this.sendAsync.bind(this));
 
   // always keep weak reference to current dialogue
--- a/testing/marionette/harness/marionette/tests/unit/test_capabilities.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_capabilities.py
@@ -37,20 +37,16 @@ class TestCapabilities(MarionetteTestCas
         self.assertIn("acceptSslCerts", self.caps)
         self.assertIn("takesElementScreenshot", self.caps)
         self.assertIn("takesScreenshot", self.caps)
 
         self.assertFalse(self.caps["acceptSslCerts"])
         self.assertTrue(self.caps["takesElementScreenshot"])
         self.assertTrue(self.caps["takesScreenshot"])
 
-    def test_selenium2_compat(self):
-        self.assertIn("platform", self.caps)
-        self.assertEqual(self.caps["platform"], self.caps["platformName"].upper())
-
     def test_we_can_pass_in_capabilities_on_session_start(self):
         self.marionette.delete_session()
         capabilities = {"desiredCapabilities": {"somethingAwesome": "cake"}}
         self.marionette.start_session(capabilities)
         caps = self.marionette.session_capabilities
         self.assertIn("somethingAwesome", caps)
 
     def test_set_specification_level(self):
--- a/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/window.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/window.py
@@ -241,17 +241,17 @@ class BrowserWindow(BaseWindow):
         """
         def callback(win):
             # Prepare action which triggers the opening of the browser window
             if callable(trigger):
                 trigger(win)
             elif trigger == 'menu':
                 self.menubar.select_by_id('tools-menu', 'menu_pageInfo')
             elif trigger == 'shortcut':
-                if win.marionette.session_capabilities['platform'] == 'WINDOWS_NT':
+                if win.marionette.session_capabilities['platformName'] == 'WINDOWS_NT':
                     raise ValueError('Page info shortcut not available on Windows.')
                 win.send_shortcut(win.get_entity('pageInfoCmd.commandkey'),
                                   accel=True)
             elif trigger == 'context_menu':
                 # TODO: Add once we can do right clicks
                 pass
             else:
                 raise ValueError('Unknown opening method: "%s"' % trigger)