Bug 1251600 - Fix test_page_info_window.py for handling platform names. r=whimboo
authorZach Munro-Cape <zach.munrocape@gmail.com>
Tue, 29 Mar 2016 13:32:24 +0200
changeset 290919 c0fa17b1195d11c2f94fc04c48bbbebb1667c80d
parent 290918 b8d9e729d5b2637db9962da12633b41fc56e0898
child 290920 dad9f126f0556cf06fcaaf09ddb86e726f2588c9
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1251600
milestone48.0a1
Bug 1251600 - Fix test_page_info_window.py for handling platform names. r=whimboo MozReview-Commit-ID: 8PXwvIx3szI
testing/firefox-ui/tests/puppeteer/test_page_info_window.py
--- a/testing/firefox-ui/tests/puppeteer/test_page_info_window.py
+++ b/testing/firefox-ui/tests/puppeteer/test_page_info_window.py
@@ -64,18 +64,17 @@ class TestPageInfoWindow(FirefoxTestCase
             self.browser.menubar.select_by_id('tools-menu', 'menu_pageInfo')
 
         open_strategies = ('menu',
                            'shortcut',
                            opener,
                            )
 
         for trigger in open_strategies:
-            if trigger == 'shortcut' and \
-                    self.marionette.session_capabilities['platform'] == 'WINDOWS_NT':
+            if trigger == 'shortcut' and self.platform == 'windows_nt':
                 # The shortcut for page info window does not exist on windows.
                 self.assertRaises(ValueError, self.browser.open_page_info_window,
                                   trigger=trigger)
                 continue
 
             page_info = self.browser.open_page_info_window(trigger=trigger)
             self.assertEquals(page_info, self.windows.current)
             page_info.close()
@@ -87,14 +86,14 @@ class TestPageInfoWindow(FirefoxTestCase
 
         # Close a tab by each trigger method
         close_strategies = ('menu',
                             'shortcut',
                             closer,
                             )
         for trigger in close_strategies:
             # menu only works on OS X
-            if trigger == 'menu' and self.platform != 'Darwin':
+            if trigger == 'menu' and self.platform != 'darwin':
                 continue
 
             page_info = self.browser.open_page_info_window()
             page_info.close(trigger=trigger)
             self.assertTrue(page_info.closed)