Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 #include "chrome/browser/tab_contents/tab_contents.h" | 6 #include "chrome/browser/tab_contents/tab_contents.h" |
| 7 #include "chrome/browser/download/download_manager.h" | 7 #include "chrome/browser/download/download_manager.h" |
| 8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 RenderViewHostManagerTest() { | 23 RenderViewHostManagerTest() { |
| 24 EnableDOMAutomation(); | 24 EnableDOMAutomation(); |
| 25 } | 25 } |
| 26 virtual void SetUpCommandLine(CommandLine* command_line) { | 26 virtual void SetUpCommandLine(CommandLine* command_line) { |
| 27 command_line->AppendSwitch(switches::kEnableExtensions); | 27 command_line->AppendSwitch(switches::kEnableExtensions); |
| 28 } | 28 } |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 // Test for crbug.com/14505. This tests that chrome:// urls are still functional | 31 // Test for crbug.com/14505. This tests that chrome:// urls are still functional |
| 32 // after download of a file while viewing another chrome://. | 32 // after download of a file while viewing another chrome://. |
| 33 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, | 33 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, ChromeURLAfterDownload) { |
|
darin (slow to review)
2009/07/25 00:25:11
nice!
| |
| 34 DISABLED_ChromeURLAfterDownload) { | |
| 35 GURL downloads_url("chrome://downloads"); | 34 GURL downloads_url("chrome://downloads"); |
| 36 GURL extensions_url("chrome://extensions"); | 35 GURL extensions_url("chrome://extensions"); |
| 37 FilePath zip_download; | 36 FilePath zip_download; |
| 38 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download)); | 37 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download)); |
| 39 zip_download = zip_download.AppendASCII("zip").AppendASCII("test.zip"); | 38 zip_download = zip_download.AppendASCII("zip").AppendASCII("test.zip"); |
| 40 GURL zip_url = net::FilePathToFileURL(zip_download); | 39 GURL zip_url = net::FilePathToFileURL(zip_download); |
| 41 | 40 |
| 42 ui_test_utils::NavigateToURL(browser(), downloads_url); | 41 ui_test_utils::NavigateToURL(browser(), downloads_url); |
| 43 ui_test_utils::NavigateToURL(browser(), zip_url); | 42 ui_test_utils::NavigateToURL(browser(), zip_url); |
| 44 ui_test_utils::WaitForDownloadCount( | 43 ui_test_utils::WaitForDownloadCount( |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 &result)); | 104 &result)); |
| 106 EXPECT_TRUE(result); | 105 EXPECT_TRUE(result); |
| 107 ui_test_utils::NavigateToURL(browser(), zip_url); | 106 ui_test_utils::NavigateToURL(browser(), zip_url); |
| 108 | 107 |
| 109 ui_test_utils::WaitForDownloadCount( | 108 ui_test_utils::WaitForDownloadCount( |
| 110 browser()->profile()->GetDownloadManager(), 1); | 109 browser()->profile()->GetDownloadManager(), 1); |
| 111 | 110 |
| 112 browser()->CloseWindow(); | 111 browser()->CloseWindow(); |
| 113 BrowserClosedObserver wait_for_close(browser()); | 112 BrowserClosedObserver wait_for_close(browser()); |
| 114 } | 113 } |
| OLD | NEW |