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. |