Chromium Code Reviews| 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 "chrome/app/chrome_command_ids.h" | 6 #include "chrome/app/chrome_command_ids.h" |
| 7 #include "chrome/browser/extensions/active_tab_permission_granter.h" | 7 #include "chrome/browser/extensions/active_tab_permission_granter.h" |
| 8 #include "chrome/browser/extensions/api/commands/command_service.h" | 8 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 9 #include "chrome/browser/extensions/browser_action_test_util.h" | 9 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 10 #include "chrome/browser/extensions/component_loader.h" | |
| 10 #include "chrome/browser/extensions/extension_action.h" | 11 #include "chrome/browser/extensions/extension_action.h" |
| 11 #include "chrome/browser/extensions/extension_action_manager.h" | 12 #include "chrome/browser/extensions/extension_action_manager.h" |
| 12 #include "chrome/browser/extensions/extension_apitest.h" | 13 #include "chrome/browser/extensions/extension_apitest.h" |
| 14 #include "chrome/browser/extensions/extension_service.h" | |
| 13 #include "chrome/browser/sessions/session_tab_helper.h" | 15 #include "chrome/browser/sessions/session_tab_helper.h" |
| 14 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_command_controller.h" | 17 #include "chrome/browser/ui/browser_command_controller.h" |
| 16 #include "chrome/browser/ui/browser_commands.h" | 18 #include "chrome/browser/ui/browser_commands.h" |
| 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 18 #include "chrome/test/base/interactive_test_utils.h" | 20 #include "chrome/test/base/interactive_test_utils.h" |
| 19 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
| 20 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
| 21 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/test/javascript_test_observer.h" | 24 #include "content/public/test/javascript_test_observer.h" |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 949 #if defined(USE_OZONE) | 951 #if defined(USE_OZONE) |
| 950 #define MAYBE_ChromeOSConversions DISABLED_ChromeOSConversions | 952 #define MAYBE_ChromeOSConversions DISABLED_ChromeOSConversions |
| 951 #else | 953 #else |
| 952 #define MAYBE_ChromeOSConversions ChromeOSConversions | 954 #define MAYBE_ChromeOSConversions ChromeOSConversions |
| 953 #endif | 955 #endif |
| 954 IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_ChromeOSConversions) { | 956 IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_ChromeOSConversions) { |
| 955 RunChromeOSConversionTest("keybinding/chromeos_conversions"); | 957 RunChromeOSConversionTest("keybinding/chromeos_conversions"); |
| 956 } | 958 } |
| 957 #endif // OS_CHROMEOS | 959 #endif // OS_CHROMEOS |
| 958 | 960 |
| 961 IN_PROC_BROWSER_TEST_F(CommandsApiTest, Component) { | |
|
Finnur
2015/02/18 11:51:31
This test would benefit from a comment explaining
David Tseng
2015/02/18 18:24:41
Done.
Finnur
2015/02/20 10:31:49
Actually, I was hoping you'd flesh it out a bit mo
David Tseng
2015/02/20 18:12:44
Got it; done.
| |
| 962 ASSERT_TRUE(test_server()->Start()); | |
| 963 ASSERT_TRUE(RunComponentExtensionTest("keybinding/component")) << message_; | |
| 964 | |
| 965 ExtensionService* extension_service = | |
| 966 extensions::ExtensionSystem::Get(browser()->profile()) | |
| 967 ->extension_service(); | |
| 968 | |
| 969 extension_service->component_loader()->Remove( | |
| 970 "pkplfbidichfdicaijlchgnapepdginl"); | |
|
Finnur
2015/02/18 11:51:31
These six lines of code can probably be shrunk dow
David Tseng
2015/02/18 18:24:41
Done.
| |
| 971 | |
| 972 ASSERT_TRUE(RunComponentExtensionTest("keybinding/component")) << message_; | |
| 973 } | |
| 974 | |
| 959 } // namespace extensions | 975 } // namespace extensions |
| OLD | NEW |