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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 PlatformThread::Sleep(action_timeout_ms()); | 259 PlatformThread::Sleep(action_timeout_ms()); |
260 | 260 |
261 CleanUpDownload(download_file, file); | 261 CleanUpDownload(download_file, file); |
262 | 262 |
263 // Ensure the download shelf is visible on the window. | 263 // Ensure the download shelf is visible on the window. |
264 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 264 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
265 ASSERT_TRUE(browser.get()); | 265 ASSERT_TRUE(browser.get()); |
266 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); | 266 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); |
267 | 267 |
268 // Open a second tab | 268 // Open a second tab |
269 browser->AppendTab(GURL("")); | 269 browser->AppendTab(GURL()); |
270 WaitUntilTabCount(2); | 270 WaitUntilTabCount(2); |
271 | 271 |
272 // Hide shelf | 272 // Hide shelf |
273 browser->SetShelfVisible(false); | 273 browser->SetShelfVisible(false); |
274 EXPECT_TRUE(WaitForDownloadShelfInvisible(browser.get())); | 274 EXPECT_TRUE(WaitForDownloadShelfInvisible(browser.get())); |
275 | 275 |
276 // Go to first tab | 276 // Go to first tab |
277 EXPECT_TRUE(browser->ActivateTab(0)); | 277 EXPECT_TRUE(browser->ActivateTab(0)); |
278 int tab_count; | 278 int tab_count; |
279 EXPECT_TRUE(browser->GetTabCount(&tab_count)); | 279 EXPECT_TRUE(browser->GetTabCount(&tab_count)); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 ASSERT_EQ(1, window_count); | 347 ASSERT_EQ(1, window_count); |
348 | 348 |
349 // Verify that the regular window does not have a download shelf. | 349 // Verify that the regular window does not have a download shelf. |
350 browser->IsShelfVisible(&is_shelf_visible); | 350 browser->IsShelfVisible(&is_shelf_visible); |
351 EXPECT_FALSE(is_shelf_visible); | 351 EXPECT_FALSE(is_shelf_visible); |
352 | 352 |
353 CleanUpDownload(file); | 353 CleanUpDownload(file); |
354 } | 354 } |
355 | 355 |
356 } // namespace | 356 } // namespace |
OLD | NEW |