diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 00:18:57 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 00:18:57 +0000 |
commit | c41e27d1d798f86b1d0cd52cbd62ee3684dc5ab6 (patch) | |
tree | 6d88a790f500b1f49ca48e15c89792edaacc0883 | |
parent | 49eab48f99690ce17378ad65229b80496656993b (diff) | |
download | chromium_src-c41e27d1d798f86b1d0cd52cbd62ee3684dc5ab6.zip chromium_src-c41e27d1d798f86b1d0cd52cbd62ee3684dc5ab6.tar.gz chromium_src-c41e27d1d798f86b1d0cd52cbd62ee3684dc5ab6.tar.bz2 |
Fix the pyauto tests
Review URL: http://codereview.chromium.org/5367001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67185 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/functional/test_utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/test/functional/test_utils.py b/chrome/test/functional/test_utils.py index 55145f9..185fc82 100644 --- a/chrome/test/functional/test_utils.py +++ b/chrome/test/functional/test_utils.py @@ -13,18 +13,19 @@ import pyauto_utils """Commonly used functions for PyAuto tests.""" def DownloadFileFromDownloadsDataDir(test, file_name): - """Download a file from downloads data directory. + """Download a file from downloads data directory, in first tab first window. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ - download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') + file_url = test.GetFileURLForDataPath(os.path.join('downloads', file_name)) downloaded_pkg = os.path.join(test.GetDownloadDirectory().value(), file_name) # Check if file already exists. If so then delete it. if os.path.exists(downloaded_pkg): RemoveDownloadedTestFile(test, file_name) + test.DownloadAndWaitForStart(file_url) test.WaitForAllDownloadsToComplete() |