| 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/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/scoped_temp_dir.h" | 7 #include "base/scoped_temp_dir.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "chrome/browser/extensions/api/management/management_api.h" |
| 11 #include "chrome/browser/extensions/api/management/management_api_constants.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 12 #include "chrome/browser/extensions/extension_browsertest.h" |
| 11 #include "chrome/browser/extensions/extension_function_test_utils.h" | 13 #include "chrome/browser/extensions/extension_function_test_utils.h" |
| 12 #include "chrome/browser/extensions/extension_install_dialog.h" | 14 #include "chrome/browser/extensions/extension_install_dialog.h" |
| 13 #include "chrome/browser/extensions/extension_management_api.h" | |
| 14 #include "chrome/browser/extensions/extension_management_api_constants.h" | |
| 15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
| 16 #include "chrome/browser/extensions/extension_test_message_listener.h" | 16 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
| 20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 | 21 |
| 22 namespace keys = extension_management_api_constants; | 22 namespace keys = extension_management_api_constants; |
| 23 namespace util = extension_function_test_utils; | 23 namespace util = extension_function_test_utils; |
| 24 | 24 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Expect an error that user cancelled the dialog. | 193 // Expect an error that user cancelled the dialog. |
| 194 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 194 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 195 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); | 195 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); |
| 196 ReEnable(true, keys::kUserDidNotReEnableError); | 196 ReEnable(true, keys::kUserDidNotReEnableError); |
| 197 | 197 |
| 198 // This should succeed when user accepts dialog. | 198 // This should succeed when user accepts dialog. |
| 199 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 199 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 200 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 200 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
| 201 ReEnable(true, ""); | 201 ReEnable(true, ""); |
| 202 } | 202 } |
| OLD | NEW |