| Index: chrome/browser/extensions/extension_commands_global_registry_apitest.cc
|
| diff --git a/chrome/browser/extensions/extension_commands_global_registry_apitest.cc b/chrome/browser/extensions/extension_commands_global_registry_apitest.cc
|
| index b9b5f6d7c77b83a684ffc192f8a59295f93ba3b4..5d45810f781266fd1a151c9a91411508aac0027f 100644
|
| --- a/chrome/browser/extensions/extension_commands_global_registry_apitest.cc
|
| +++ b/chrome/browser/extensions/extension_commands_global_registry_apitest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "chrome/test/base/interactive_test_utils.h"
|
| #include "content/public/test/browser_test_utils.h"
|
| #include "ui/base/base_window.h"
|
| +#include "ui/base/test/ui_controls.h"
|
|
|
| #if defined(OS_LINUX)
|
| #include <X11/Xlib.h>
|
| @@ -128,4 +129,37 @@ IN_PROC_BROWSER_TEST_F(GlobalCommandsApiTest, MAYBE_GlobalCommand) {
|
| ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
|
| }
|
|
|
| +#if defined(OS_WIN)
|
| +// The feature is only fully implemented on Windows, other platforms coming.
|
| +#define MAYBE_GlobalDuplicatedMediaKey GlobalDuplicatedMediaKey
|
| +#else
|
| +#define MAYBE_GlobalDuplicatedMediaKey DISABLED_GlobalDuplicatedMediaKey
|
| +#endif
|
| +
|
| +IN_PROC_BROWSER_TEST_F(GlobalCommandsApiTest, MAYBE_GlobalDuplicatedMediaKey) {
|
| + FeatureSwitch::ScopedOverride enable_global_commands(
|
| + FeatureSwitch::global_commands(), true);
|
| +
|
| + ResultCatcher catcher;
|
| + ASSERT_TRUE(RunExtensionTest("keybinding/global_media_keys_0")) << message_;
|
| + ASSERT_TRUE(catcher.GetNextResult());
|
| + ASSERT_TRUE(RunExtensionTest("keybinding/global_media_keys_1")) << message_;
|
| + ASSERT_TRUE(catcher.GetNextResult());
|
| +
|
| + Browser* incognito_browser = CreateIncognitoBrowser(); // Ditto.
|
| + WindowController* controller =
|
| + incognito_browser->extension_window_controller();
|
| +
|
| + ui_controls::SendKeyPress(controller->window()->GetNativeWindow(),
|
| + ui::VKEY_MEDIA_NEXT_TRACK,
|
| + false,
|
| + false,
|
| + false,
|
| + false);
|
| +
|
| + // We should get two success result.
|
| + ASSERT_TRUE(catcher.GetNextResult());
|
| + ASSERT_TRUE(catcher.GetNextResult());
|
| +}
|
| +
|
| } // namespace extensions
|
|
|