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

Unified Diff: chrome/browser/extensions/extension_keybinding_apitest.cc

Issue 64273008: [Windows] Finish global and non-global media keys support on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gclient sync. Created 7 years, 1 month 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/browser/extensions/extension_keybinding_apitest.cc
diff --git a/chrome/browser/extensions/extension_keybinding_apitest.cc b/chrome/browser/extensions/extension_keybinding_apitest.cc
index 136910f71c55a9d256ff84139f20664e770f69ee..22e56be31edaa2a203fb6f0ee969343d70475af3 100644
--- a/chrome/browser/extensions/extension_keybinding_apitest.cc
+++ b/chrome/browser/extensions/extension_keybinding_apitest.cc
@@ -261,4 +261,30 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_DontOverwriteSystemShortcuts) {
ASSERT_TRUE(result);
}
+#if defined(OS_WIN)
+// Currently this feature is implemented on Windows only.
+#define MAYBE_AllowDuplicatedMediaKeys AllowDuplicatedMediaKeys
+#else
+#define MAYBE_AllowDuplicatedMediaKeys DISABLED_AllowDuplicatedMediaKeys
+#endif
+
+// Test that media keys go to all extensions that register for them.
+IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_AllowDuplicatedMediaKeys) {
+ ResultCatcher catcher;
+ ASSERT_TRUE(RunExtensionTest("keybinding/non_global_media_keys_0"))
+ << message_;
+ ASSERT_TRUE(catcher.GetNextResult());
+ ASSERT_TRUE(RunExtensionTest("keybinding/non_global_media_keys_1"))
+ << message_;
+ ASSERT_TRUE(catcher.GetNextResult());
+
+ // Activate the Media Stop key.
+ ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
+ browser(), ui::VKEY_MEDIA_STOP, false, false, false, false));
+
+ // We should get two success result.
+ ASSERT_TRUE(catcher.GetNextResult());
+ ASSERT_TRUE(catcher.GetNextResult());
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698