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

Side by Side Diff: chrome/browser/extensions/webstore_inline_install_browsertest.cc

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor clean-ups Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_install_dialog.h" 9 #include "chrome/browser/extensions/extension_install_dialog.h"
10 #include "chrome/browser/extensions/extension_install_ui.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/webstore_inline_installer.h" 12 #include "chrome/browser/extensions/webstore_inline_installer.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/test/base/in_process_browser_test.h" 17 #include "chrome/test/base/in_process_browser_test.h"
18 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/notification_types.h" 19 #include "content/public/browser/notification_types.h"
20 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 WebstoreInlineInstallTest::SetUpCommandLine(command_line); 155 WebstoreInlineInstallTest::SetUpCommandLine(command_line);
156 156
157 GURL crx_url = GenerateTestServerUrl( 157 GURL crx_url = GenerateTestServerUrl(
158 kWebstoreDomain, "malformed_extension.crx"); 158 kWebstoreDomain, "malformed_extension.crx");
159 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 159 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
160 switches::kAppsGalleryUpdateURL, crx_url.spec()); 160 switches::kAppsGalleryUpdateURL, crx_url.spec());
161 } 161 }
162 162
163 void SetUpInProcessBrowserTestFixture() OVERRIDE { 163 void SetUpInProcessBrowserTestFixture() OVERRIDE {
164 WebstoreInlineInstallTest::SetUpInProcessBrowserTestFixture(); 164 WebstoreInlineInstallTest::SetUpInProcessBrowserTestFixture();
165 ExtensionInstallUI::DisableFailureUIForTests(); 165 ExtensionInstallPrompt::DisableFailureUIForTests();
166 } 166 }
167 }; 167 };
168 168
169 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest, 169 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest,
170 WebstoreInlineInstallUnpackFailureTest) { 170 WebstoreInlineInstallUnpackFailureTest) {
171 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 171 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
172 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); 172 switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
173 173
174 ui_test_utils::NavigateToURL(browser(), 174 ui_test_utils::NavigateToURL(browser(),
175 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html")); 175 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html"));
176 176
177 RunInlineInstallTest("runTest"); 177 RunInlineInstallTest("runTest");
178 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698