Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc

Issue 179032: Enable extensions by default. (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
29 }; 26 };
30 27
31 // Test for crbug.com/14505. This tests that chrome:// urls are still functional 28 // Test for crbug.com/14505. This tests that chrome:// urls are still functional
32 // after download of a file while viewing another chrome://. 29 // after download of a file while viewing another chrome://.
33 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, 30 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
34 DISABLED_ChromeURLAfterDownload) { 31 DISABLED_ChromeURLAfterDownload) {
35 GURL downloads_url("chrome://downloads"); 32 GURL downloads_url("chrome://downloads");
36 GURL extensions_url("chrome://extensions"); 33 GURL extensions_url("chrome://extensions");
37 FilePath zip_download; 34 FilePath zip_download;
38 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download)); 35 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 &result)); 102 &result));
106 EXPECT_TRUE(result); 103 EXPECT_TRUE(result);
107 ui_test_utils::NavigateToURL(browser(), zip_url); 104 ui_test_utils::NavigateToURL(browser(), zip_url);
108 105
109 ui_test_utils::WaitForDownloadCount( 106 ui_test_utils::WaitForDownloadCount(
110 browser()->profile()->GetDownloadManager(), 1); 107 browser()->profile()->GetDownloadManager(), 1);
111 108
112 browser()->CloseWindow(); 109 browser()->CloseWindow();
113 BrowserClosedObserver wait_for_close(browser()); 110 BrowserClosedObserver wait_for_close(browser());
114 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698