Chromium Code Reviews| Index: chrome/test/pyautolib/pyauto.py |
| diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py |
| index 8545f65370ef27ffa0e6a2e6652bcf7c3353f5c6..1897e337136c4ef54b3892811cf116fb66467fbf 100644 |
| --- a/chrome/test/pyautolib/pyauto.py |
| +++ b/chrome/test/pyautolib/pyauto.py |
| @@ -82,6 +82,7 @@ except ImportError: |
| import bookmark_model |
| import download_info |
| import history_info |
| +import ntp_model |
| import omnibox_info |
| import plugins_info |
| import prefs_info |
| @@ -197,6 +198,15 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): |
| os.path.join(PyUITest.DataDir(), relative_path)) |
| @staticmethod |
| + def GetFileURLForDataPath(relative_path): |
|
Nirnimesh
2010/11/16 22:25:05
this function is duplicate
|
| + """Get file:// url for the given path relative to the chrome test data dir. |
| + |
| + Also quotes the url using urllib.quote(). |
| + """ |
| + return PyUITest.GetFileURLForPath( |
| + os.path.join(PyUITest.DataDir(), relative_path)) |
| + |
| + @staticmethod |
| def IsMac(): |
| """Are we on Mac?""" |
| return 'darwin' == sys.platform |
| @@ -1776,6 +1786,11 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): |
| } |
| return self._GetResultFromJSONRequest(cmd_dict)['success'] |
| + def GetNTPModel(self): |
| + """Returns the NTPModel.""" |
| + return ntp_model.NTPModel(self) |
| + |
| + |
| class PyUITestSuite(pyautolib.PyUITestSuiteBase, unittest.TestSuite): |
| """Base TestSuite for PyAuto UI tests.""" |