summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 00:18:57 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 00:18:57 +0000
commitc41e27d1d798f86b1d0cd52cbd62ee3684dc5ab6 (patch)
tree6d88a790f500b1f49ca48e15c89792edaacc0883
parent49eab48f99690ce17378ad65229b80496656993b (diff)
downloadchromium_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.py5
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()