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

Side by Side Diff: chrome/browser/extensions/extension_keybinding_apitest.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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 result = false; 233 result = false;
236 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 234 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
237 tab, 235 tab,
238 "setInterval(function() {" 236 "setInterval(function() {"
239 " if (document.body.bgColor == 'blue') {" 237 " if (document.body.bgColor == 'blue') {"
240 " window.domAutomationController.send(true)}}, 100)", 238 " window.domAutomationController.send(true)}}, 100)",
241 &result)); 239 &result));
242 ASSERT_TRUE(result); 240 ASSERT_TRUE(result);
243 } 241 }
244 242
245 } // extensions 243 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698