Index: chrome/test/functional/test_utils.py |
diff --git a/chrome/test/functional/test_utils.py b/chrome/test/functional/test_utils.py |
index 6cee67b97346ed3125d7efe34596f415430f530e..43e4cc430b13841f4918a044e03dbd290bcee793 100644 |
--- a/chrome/test/functional/test_utils.py |
+++ b/chrome/test/functional/test_utils.py |
@@ -44,6 +44,19 @@ def CopyFileFromDataDirToDownloadDir(test, file_path): |
download_dir = test.GetDownloadDirectory().value() |
shutil.copy(data_file, download_dir) |
+ |
+def CopyFileFromContentDataDirToDownloadDir(test, file_path): |
+ """Copy a file from content data directory to downloads directory. |
+ |
+ Args: |
+ test: derived from pyauto.PyUITest - base class for UI test cases. |
+ path: path of the file relative to the data directory |
+ """ |
+ data_file = os.path.join(test.ContentDataDir(), file_path) |
+ download_dir = test.GetDownloadDirectory().value() |
+ shutil.copy(data_file, download_dir) |
+ |
+ |
def DownloadFileFromDownloadsDataDir(test, file_name): |
"""Download a file from downloads data directory, in first tab, first window. |