| 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" |
| 11 #include "chrome/common/notification_details.h" | 11 #include "chrome/common/notification_details.h" |
| 12 #include "chrome/common/notification_observer.h" | 12 #include "chrome/common/notification_observer.h" |
| 13 #include "chrome/common/notification_registrar.h" | 13 #include "chrome/common/notification_registrar.h" |
| 14 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
| 15 #include "chrome/common/notification_type.h" | 15 #include "chrome/common/notification_type.h" |
| 16 #include "chrome/common/extensions/extension_error_reporter.h" | 16 #include "chrome/common/extensions/extension_error_reporter.h" |
| 17 #include "chrome/test/in_process_browser_test.h" | 17 #include "chrome/test/in_process_browser_test.h" |
| 18 #include "chrome/test/ui_test_utils.h" | 18 #include "chrome/test/ui_test_utils.h" |
| 19 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
| 20 | 20 |
| 21 class RenderViewHostManagerTest : public InProcessBrowserTest { | 21 class RenderViewHostManagerTest : public InProcessBrowserTest { |
| 22 public: | 22 public: |
| 23 RenderViewHostManagerTest() { | 23 RenderViewHostManagerTest() { |
| 24 EnableDOMAutomation(); | 24 EnableDOMAutomation(); |
| 25 } | 25 } |
| 26 virtual void SetUpCommandLine(CommandLine* command_line) { |
| 27 command_line->AppendSwitch(switches::kEnableExtensions); |
| 28 } |
| 26 }; | 29 }; |
| 27 | 30 |
| 28 // 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 |
| 29 // after download of a file while viewing another chrome://. | 32 // after download of a file while viewing another chrome://. |
| 30 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, | 33 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, |
| 31 DISABLED_ChromeURLAfterDownload) { | 34 DISABLED_ChromeURLAfterDownload) { |
| 32 GURL downloads_url("chrome://downloads"); | 35 GURL downloads_url("chrome://downloads"); |
| 33 GURL extensions_url("chrome://extensions"); | 36 GURL extensions_url("chrome://extensions"); |
| 34 FilePath zip_download; | 37 FilePath zip_download; |
| 35 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download)); | 38 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download)); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 &result)); | 105 &result)); |
| 103 EXPECT_TRUE(result); | 106 EXPECT_TRUE(result); |
| 104 ui_test_utils::NavigateToURL(browser(), zip_url); | 107 ui_test_utils::NavigateToURL(browser(), zip_url); |
| 105 | 108 |
| 106 ui_test_utils::WaitForDownloadCount( | 109 ui_test_utils::WaitForDownloadCount( |
| 107 browser()->profile()->GetDownloadManager(), 1); | 110 browser()->profile()->GetDownloadManager(), 1); |
| 108 | 111 |
| 109 browser()->CloseWindow(); | 112 browser()->CloseWindow(); |
| 110 BrowserClosedObserver wait_for_close(browser()); | 113 BrowserClosedObserver wait_for_close(browser()); |
| 111 } | 114 } |
| OLD | NEW |