| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); | 506 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); |
| 507 ASSERT_TRUE(tab_proxy->NavigateToURLAsyncWithDisposition( | 507 ASSERT_TRUE(tab_proxy->NavigateToURLAsyncWithDisposition( |
| 508 URLRequestMockHTTPJob::GetMockUrl(file), NEW_WINDOW)); | 508 URLRequestMockHTTPJob::GetMockUrl(file), NEW_WINDOW)); |
| 509 | 509 |
| 510 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); | 510 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); |
| 511 | 511 |
| 512 CheckDownload(file); | 512 CheckDownload(file); |
| 513 } | 513 } |
| 514 | 514 |
| 515 // http://crbug.com/50060 | |
| 516 #if defined(OS_MACOSX) || defined(OS_LINUX) | |
| 517 #define MAYBE_NewWindow DISABLED_NewWindow | |
| 518 #else | |
| 519 #define MAYBE_NewWindow NewWindow | |
| 520 #endif | |
| 521 | |
| 522 // Regression test for http://crbug.com/44454 | 515 // Regression test for http://crbug.com/44454 |
| 523 TEST_F(DownloadTest, MAYBE_NewWindow) { | 516 // See also http://crbug.com/50060. |
| 517 TEST_F(DownloadTest, DISABLED_NewWindow) { |
| 524 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 518 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 525 ASSERT_TRUE(browser.get()); | 519 ASSERT_TRUE(browser.get()); |
| 526 int window_count = 0; | 520 int window_count = 0; |
| 527 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 521 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
| 528 ASSERT_EQ(1, window_count); | 522 ASSERT_EQ(1, window_count); |
| 529 EXPECT_EQ(1, GetTabCount()); | 523 EXPECT_EQ(1, GetTabCount()); |
| 530 | 524 |
| 531 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); | 525 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); |
| 532 ASSERT_TRUE(tab_proxy.get()); | 526 ASSERT_TRUE(tab_proxy.get()); |
| 533 | 527 |
| 534 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); | 528 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); |
| 535 ASSERT_TRUE(tab_proxy->NavigateToURLAsyncWithDisposition( | 529 ASSERT_TRUE(tab_proxy->NavigateToURLAsyncWithDisposition( |
| 536 URLRequestMockHTTPJob::GetMockUrl(file), NEW_WINDOW)); | 530 URLRequestMockHTTPJob::GetMockUrl(file), NEW_WINDOW)); |
| 537 | 531 |
| 538 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); | 532 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); |
| 539 | 533 |
| 540 CheckDownload(file); | 534 CheckDownload(file); |
| 541 } | 535 } |
| 542 | 536 |
| 543 } // namespace | 537 } // namespace |
| OLD | NEW |