Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/download/download_uitest.cc

Issue 345024: Unflaky tests. (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 #include <string> 6 #include <string>
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <shlwapi.h> 10 #include <shlwapi.h>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 FAIL() << "Could not detect Internet ZoneIndentifier"; 170 FAIL() << "Could not detect Internet ZoneIndentifier";
171 } 171 }
172 #endif // defined(OS_WIN) 172 #endif // defined(OS_WIN)
173 173
174 FilePath download_prefix_; 174 FilePath download_prefix_;
175 }; 175 };
176 176
177 // Download a file with non-viewable content, verify that the 177 // Download a file with non-viewable content, verify that the
178 // download tab opened and the file exists. 178 // download tab opened and the file exists.
179 // This test is flaky. See bug 24889. 179 // This test is flaky. See bug 24889.
Nicolas Sylvain 2009/10/29 23:17:48 remove the comment?
180 TEST_F(DownloadTest, FLAKY_DownloadMimeType) { 180 TEST_F(DownloadTest, DownloadMimeType) {
181 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); 181 FilePath file(FILE_PATH_LITERAL("download-test1.lib"));
182 182
183 EXPECT_EQ(1, GetTabCount()); 183 EXPECT_EQ(1, GetTabCount());
184 184
185 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); 185 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file));
186 // No new tabs created, downloads appear in the current tab's download shelf. 186 // No new tabs created, downloads appear in the current tab's download shelf.
187 WaitUntilTabCount(1); 187 WaitUntilTabCount(1);
188 188
189 // Wait until the file is downloaded. 189 // Wait until the file is downloaded.
190 PlatformThread::Sleep(action_timeout_ms()); 190 PlatformThread::Sleep(action_timeout_ms());
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 GURL url(URLRequestSlowDownloadJob::kKnownSizeUrl); 308 GURL url(URLRequestSlowDownloadJob::kKnownSizeUrl);
309 FilePath filename; 309 FilePath filename;
310 net::FileURLToFilePath(url, &filename); 310 net::FileURLToFilePath(url, &filename);
311 filename = filename.BaseName(); 311 filename = filename.BaseName();
312 RunSizeTest(url, L"71% - " + filename.ToWStringHack(), 312 RunSizeTest(url, L"71% - " + filename.ToWStringHack(),
313 L"100% - " + filename.ToWStringHack()); 313 L"100% - " + filename.ToWStringHack());
314 } 314 }
315 315
316 // Test that when downloading an item in Incognito mode, we don't crash when 316 // Test that when downloading an item in Incognito mode, we don't crash when
317 // closing the last Incognito window (http://crbug.com/13983). 317 // closing the last Incognito window (http://crbug.com/13983).
318 // This test is flaky. See bug 24684. 318 TEST_F(DownloadTest, IncognitoDownload) {
319 TEST_F(DownloadTest, FLAKY_IncognitoDownload) {
320 // Open a regular window and sanity check default values for window / tab 319 // Open a regular window and sanity check default values for window / tab
321 // count and shelf visibility. 320 // count and shelf visibility.
322 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 321 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
323 int window_count = 0; 322 int window_count = 0;
324 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); 323 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count));
325 ASSERT_EQ(1, window_count); 324 ASSERT_EQ(1, window_count);
326 EXPECT_EQ(1, GetTabCount()); 325 EXPECT_EQ(1, GetTabCount());
327 bool is_shelf_visible; 326 bool is_shelf_visible;
328 browser->IsShelfVisible(&is_shelf_visible); 327 browser->IsShelfVisible(&is_shelf_visible);
329 EXPECT_FALSE(is_shelf_visible); 328 EXPECT_FALSE(is_shelf_visible);
(...skipping 20 matching lines...) Expand all
350 ASSERT_EQ(1, window_count); 349 ASSERT_EQ(1, window_count);
351 350
352 // Verify that the regular window does not have a download shelf. 351 // Verify that the regular window does not have a download shelf.
353 browser->IsShelfVisible(&is_shelf_visible); 352 browser->IsShelfVisible(&is_shelf_visible);
354 EXPECT_FALSE(is_shelf_visible); 353 EXPECT_FALSE(is_shelf_visible);
355 354
356 CleanUpDownload(file); 355 CleanUpDownload(file);
357 } 356 }
358 357
359 } // namespace 358 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698