| OLD | NEW |
| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // Ensure the download shelf is visible on the window. | 242 // Ensure the download shelf is visible on the window. |
| 243 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 243 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 244 ASSERT_TRUE(browser.get()); | 244 ASSERT_TRUE(browser.get()); |
| 245 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); | 245 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); |
| 246 } | 246 } |
| 247 | 247 |
| 248 // Test that the download shelf is per-window by starting a download in one | 248 // Test that the download shelf is per-window by starting a download in one |
| 249 // tab, opening a second tab, closing the shelf, going back to the first tab, | 249 // tab, opening a second tab, closing the shelf, going back to the first tab, |
| 250 // and checking that the shelf is closed. | 250 // and checking that the shelf is closed. |
| 251 TEST_F(DownloadTest, PerWindowShelf) { | 251 // See bug http://crbug.com/26325 |
| 252 TEST_F(DownloadTest, FLAKY_PerWindowShelf) { |
| 252 FilePath file(FILE_PATH_LITERAL("download-test3.gif")); | 253 FilePath file(FILE_PATH_LITERAL("download-test3.gif")); |
| 253 FilePath download_file(FILE_PATH_LITERAL("download-test3-attachment.gif")); | 254 FilePath download_file(FILE_PATH_LITERAL("download-test3-attachment.gif")); |
| 254 | 255 |
| 255 EXPECT_EQ(1, GetTabCount()); | 256 EXPECT_EQ(1, GetTabCount()); |
| 256 | 257 |
| 257 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); | 258 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); |
| 258 WaitUntilTabCount(1); | 259 WaitUntilTabCount(1); |
| 259 | 260 |
| 260 // Wait until the file is downloaded. | 261 // Wait until the file is downloaded. |
| 261 PlatformThread::Sleep(action_timeout_ms()); | 262 PlatformThread::Sleep(action_timeout_ms()); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 ASSERT_EQ(1, window_count); | 349 ASSERT_EQ(1, window_count); |
| 349 | 350 |
| 350 // Verify that the regular window does not have a download shelf. | 351 // Verify that the regular window does not have a download shelf. |
| 351 browser->IsShelfVisible(&is_shelf_visible); | 352 browser->IsShelfVisible(&is_shelf_visible); |
| 352 EXPECT_FALSE(is_shelf_visible); | 353 EXPECT_FALSE(is_shelf_visible); |
| 353 | 354 |
| 354 CleanUpDownload(file); | 355 CleanUpDownload(file); |
| 355 } | 356 } |
| 356 | 357 |
| 357 } // namespace | 358 } // namespace |
| OLD | NEW |