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

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

Issue 20593003: Move kEnableExperimentalExtensionApis switch to extensions/common/switches.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 "chrome/browser/extensions/active_tab_permission_granter.h" 5 #include "chrome/browser/extensions/active_tab_permission_granter.h"
6 #include "chrome/browser/extensions/browser_action_test_util.h" 6 #include "chrome/browser/extensions/browser_action_test_util.h"
7 #include "chrome/browser/extensions/extension_action.h" 7 #include "chrome/browser/extensions/extension_action.h"
8 #include "chrome/browser/extensions/extension_action_manager.h" 8 #include "chrome/browser/extensions/extension_action_manager.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 }; 35 };
36 36
37 class ScriptBadgesCommandsApiTest : public ExtensionApiTest { 37 class ScriptBadgesCommandsApiTest : public ExtensionApiTest {
38 public: 38 public:
39 ScriptBadgesCommandsApiTest() { 39 ScriptBadgesCommandsApiTest() {
40 // We cannot add this to CommandsApiTest because then PageActions get 40 // We cannot add this to CommandsApiTest because then PageActions get
41 // treated like BrowserActions and the PageAction test starts failing. 41 // treated like BrowserActions and the PageAction test starts failing.
42 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 42 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
43 switches::kScriptBadges, "1"); 43 switches::kScriptBadges, "1");
44 CommandLine::ForCurrentProcess()->AppendSwitch(
45 switches::kEnableExperimentalExtensionApis);
46 } 44 }
47 virtual ~ScriptBadgesCommandsApiTest() {} 45 virtual ~ScriptBadgesCommandsApiTest() {}
48 }; 46 };
49 47
50 // Test the basic functionality of the Keybinding API: 48 // Test the basic functionality of the Keybinding API:
51 // - That pressing the shortcut keys should perform actions (activate the 49 // - That pressing the shortcut keys should perform actions (activate the
52 // browser action or send an event). 50 // browser action or send an event).
53 // - Note: Page action keybindings are tested in PageAction test below. 51 // - Note: Page action keybindings are tested in PageAction test below.
54 // - The shortcut keys taken by one extension are not overwritten by the last 52 // - The shortcut keys taken by one extension are not overwritten by the last
55 // installed extension. 53 // installed extension.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 186 }
189 187
190 // This test validates that the getAll query API function returns registered 188 // This test validates that the getAll query API function returns registered
191 // commands as well as synthesized ones and that inactive commands (like the 189 // commands as well as synthesized ones and that inactive commands (like the
192 // synthesized ones are in nature) have no shortcuts. 190 // synthesized ones are in nature) have no shortcuts.
193 IN_PROC_BROWSER_TEST_F(CommandsApiTest, SynthesizedCommand) { 191 IN_PROC_BROWSER_TEST_F(CommandsApiTest, SynthesizedCommand) {
194 ASSERT_TRUE(test_server()->Start()); 192 ASSERT_TRUE(test_server()->Start());
195 ASSERT_TRUE(RunExtensionTest("keybinding/synthesized")) << message_; 193 ASSERT_TRUE(RunExtensionTest("keybinding/synthesized")) << message_;
196 } 194 }
197 195
198 } // extensions 196 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698