summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-23 21:40:52 +0000
committernsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-23 21:40:52 +0000
commita665af7b41294053ae09d601adcbf357c470f955 (patch)
treeba1894848dd5663e37071d137710b5b5a31c7c11 /chrome
parent7535a22733570b5fdf05f19cd4f4f58571af335a (diff)
downloadchromium_src-a665af7b41294053ae09d601adcbf357c470f955.zip
chromium_src-a665af7b41294053ae09d601adcbf357c470f955.tar.gz
chromium_src-a665af7b41294053ae09d601adcbf357c470f955.tar.bz2
Try to remove the flakyness in the test by adding a Sleep.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/download_uitest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/download_uitest.cc b/chrome/browser/download_uitest.cc
index 7690636..0d35604 100644
--- a/chrome/browser/download_uitest.cc
+++ b/chrome/browser/download_uitest.cc
@@ -183,6 +183,10 @@ TEST_F(DownloadTest, DownloadMimeType) {
NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file));
// No new tabs created, downloads appear in the current tab's download shelf.
WaitUntilTabCount(1);
+
+ // Wait until the file is downloaded.
+ Sleep(1000);
+
CleanUpDownload(file);
scoped_ptr<TabProxy> tab_proxy(GetActiveTab());
@@ -205,6 +209,9 @@ TEST_F(DownloadTest, NoDownload) {
NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file));
WaitUntilTabCount(1);
+ // Wait to see if the file will be downloaded.
+ Sleep(1000);
+
EXPECT_FALSE(file_util::PathExists(file_path));
if (file_util::PathExists(file_path))
ASSERT_TRUE(file_util::Delete(file_path, false));
@@ -227,6 +234,9 @@ TEST_F(DownloadTest, ContentDisposition) {
NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file));
WaitUntilTabCount(1);
+ // Wait until the file is downloaded.
+ Sleep(1000);
+
CleanUpDownload(download_file, file);
// Ensure the download shelf is visible on the current tab.