OLD | NEW |
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" | |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 9 #include "chrome/browser/extensions/extension_install_ui.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/startup_helper.h" | 11 #include "chrome/browser/extensions/startup_helper.h" |
13 #include "chrome/browser/extensions/webstore_standalone_installer.h" | 12 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
14 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_tabstrip.h" | 14 #include "chrome/browser/ui/browser_tabstrip.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
18 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 234 |
236 IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Cancel) { | 235 IN_PROC_BROWSER_TEST_F(CommandLineWebstoreInstall, Cancel) { |
237 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 236 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
238 command_line->AppendSwitchASCII( | 237 command_line->AppendSwitchASCII( |
239 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); | 238 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); |
240 extensions::StartupHelper helper; | 239 extensions::StartupHelper helper; |
241 EXPECT_FALSE(helper.InstallFromWebstore(*command_line, browser()->profile())); | 240 EXPECT_FALSE(helper.InstallFromWebstore(*command_line, browser()->profile())); |
242 EXPECT_FALSE(saw_install()); | 241 EXPECT_FALSE(saw_install()); |
243 EXPECT_EQ(0, browser_open_count_); | 242 EXPECT_EQ(0, browser_open_count_); |
244 } | 243 } |
OLD | NEW |