Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5600)

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 2117009: Fix a pref test -- Win/Linux don't have browser.show_page_options_buttons pref (Closed)
Patch Set: plat identification Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/functional/prefs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index a2b7166d51f5eaefb9377861d7ab6fd464365841..2a685cea53c0a2b373a2e260fdadcbb04b4d45ff 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -179,6 +179,26 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
quoted_path = urllib.quote(abs_path)
return 'file://' + quoted_path
+ @staticmethod
+ def IsMac():
+ """Are we on Mac?"""
+ return 'darwin' == sys.platform
+
+ @staticmethod
+ def IsLinux():
+ """Are we on Linux?"""
+ return 'linux2' == sys.platform
+
+ @staticmethod
+ def IsWin():
+ """Are we on Win?"""
+ return 'win32' == sys.platform
+
+ @staticmethod
+ def IsPosix():
+ """Are we on Mac/Linux?"""
+ return PyUITest.IsMac() or PyUITest.IsLinux()
+
def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]):
"""Poll on a condition until timeout.
« no previous file with comments | « chrome/test/functional/prefs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698