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

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

Issue 5088001: Add pyauto hook for getting and manipulating the data underneath the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/functional
Patch Set: Clean up Created 10 years, 1 month 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
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."""

Powered by Google App Engine
This is Rietveld 408576698