Index: chrome/common/extensions/command_unittest.cc |
diff --git a/chrome/common/extensions/command_unittest.cc b/chrome/common/extensions/command_unittest.cc |
index 56b968669326ee27d93c115d8a0e76bbcb192fe1..cd985e6d3e79cbbaa03345ad140600dee609dc78 100644 |
--- a/chrome/common/extensions/command_unittest.cc |
+++ b/chrome/common/extensions/command_unittest.cc |
@@ -43,6 +43,14 @@ TEST(CommandTest, ExtensionCommandParsing) { |
const ui::Accelerator ctrl_end = ui::Accelerator(ui::VKEY_END, ctrl); |
const ui::Accelerator ctrl_pgup = ui::Accelerator(ui::VKEY_PRIOR, ctrl); |
const ui::Accelerator ctrl_pgdwn = ui::Accelerator(ui::VKEY_NEXT, ctrl); |
+ const ui::Accelerator next_track = |
+ ui::Accelerator(ui::VKEY_MEDIA_NEXT_TRACK, ui::EF_NONE); |
+ const ui::Accelerator prev_track = |
+ ui::Accelerator(ui::VKEY_MEDIA_PREV_TRACK, ui::EF_NONE); |
+ const ui::Accelerator play_pause = |
+ ui::Accelerator(ui::VKEY_MEDIA_PLAY_PAUSE, ui::EF_NONE); |
+ const ui::Accelerator stop = |
+ ui::Accelerator(ui::VKEY_MEDIA_STOP, ui::EF_NONE); |
const struct { |
bool expected_result; |
@@ -100,6 +108,14 @@ TEST(CommandTest, ExtensionCommandParsing) { |
{ true, ctrl_end, "_execute_browser_action", "Ctrl+End", "" }, |
{ true, ctrl_pgup, "_execute_browser_action", "Ctrl+PageUp", "" }, |
{ true, ctrl_pgdwn, "_execute_browser_action", "Ctrl+PageDown", "" }, |
+ // Media keys. |
+ { true, next_track, "command", "MediaNextTrack", "description" }, |
+ { true, play_pause, "command", "MediaPlayPause", "description" }, |
+ { true, prev_track, "command", "MediaPrevTrack", "description" }, |
+ { true, stop, "command", "MediaStop", "description" }, |
+ { false, none, "_execute_browser_action", "MediaNextTrack", "" }, |
+ { false, none, "_execute_page_action", "MediaPrevTrack", "" }, |
+ { false, none, "command", "Ctrl+Shift+MediaPrevTrack", "description" }, |
}; |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTests); ++i) { |