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

Unified Diff: chrome/common/extensions/api/commands/commands_manifest_unittest.cc

Issue 12965009: Remove the limit of number of commands per extension, but keep the limit of 4 shortcuts per extensi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/commands/commands_manifest_unittest.cc
===================================================================
--- chrome/common/extensions/api/commands/commands_manifest_unittest.cc (revision 190361)
+++ chrome/common/extensions/api/commands/commands_manifest_unittest.cc (working copy)
@@ -22,9 +22,6 @@
};
TEST_F(CommandsManifestTest, CommandManifestSimple) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
-
#if defined(OS_MACOSX)
int ctrl = ui::EF_COMMAND_DOWN;
#else
@@ -67,26 +64,22 @@
ASSERT_EQ(ctrl_f, page_action->accelerator());
}
-TEST_F(CommandsManifestTest, CommandManifestTooMany) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
-
+TEST_F(CommandsManifestTest, CommandManifestShortcutsTooMany) {
LoadAndExpectError("command_too_many.json",
errors::kInvalidKeyBindingTooMany);
}
-TEST_F(CommandsManifestTest, CommandManifestAllowNumbers) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
+TEST_F(CommandsManifestTest, CommandManifestManyButWithinBounds) {
+ scoped_refptr<Extension> extension =
+ LoadAndExpectSuccess("command_many_but_shortcuts_under_limit.json");
+}
+TEST_F(CommandsManifestTest, CommandManifestAllowNumbers) {
scoped_refptr<Extension> extension =
LoadAndExpectSuccess("command_allow_numbers.json");
}
TEST_F(CommandsManifestTest, CommandManifestRejectJustShift) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
-
LoadAndExpectError("command_reject_just_shift.json",
errors::kInvalidKeyBinding);
}

Powered by Google App Engine
This is Rietveld 408576698