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

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

Issue 10825006: Update pyauto tests to use content/test/data/plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/plugins.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 c9c8e4f6f4afe05751605a26ee615cf6ff64a48a..dfe25d69bf43b129f724881405d67290df00a2aa 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -608,6 +608,23 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
return _HTTP_SERVER.GetURL(os.path.join('files', *relative_path)).spec()
@staticmethod
+ def ContentDataDir():
+ """Get path to content/test/data."""
+ return os.path.join(PyUITest.DataDir(), os.pardir, os.pardir, os.pardir,
+ 'content', 'test', 'data')
+
+ @staticmethod
+ def GetFileURLForContentDataPath(*relative_path):
+ """Get file:// url for the given path relative to content test data dir.
+
+ Also quotes the url using urllib.quote().
+
+ Args:
+ relative_path: Variable number of strings that can be joined.
+ """
+ return PyUITest.GetFileURLForPath(PyUITest.ContentDataDir(), *relative_path)
+
+ @staticmethod
def GetFtpURLForDataPath(ftp_server, *relative_path):
"""Get ftp:// url for the given path in the data dir.
« no previous file with comments | « chrome/test/functional/plugins.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698