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

Unified Diff: LayoutTests/media/activation-behavior-accesskey.html

Issue 829393004: Re-re-enable the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop the changes to MediaControlOverlayPlayButtonElement and add a test Created 5 years, 11 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
« no previous file with comments | « LayoutTests/media/activation-behavior.html ('k') | LayoutTests/media/activation-behavior-fullscreen.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/activation-behavior-accesskey.html
diff --git a/LayoutTests/media/activation-behavior-accesskey.html b/LayoutTests/media/activation-behavior-accesskey.html
new file mode 100644
index 0000000000000000000000000000000000000000..a0df852db07d5774f1c6bb65128311f3676ab685
--- /dev/null
+++ b/LayoutTests/media/activation-behavior-accesskey.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<title>activation behavior using accesskey</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<video controls accesskey="x"></video>
+<script>
+function pressAccessKey(key)
+{
+ if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
+ modifiers = ["ctrlKey", "altKey"];
+ else
+ modifiers = ["altKey"];
+ eventSender.keyDown(key, modifiers);
+}
+
+test(function()
+{
+ var v = document.querySelector("video");
+ assert_true(v.paused, "paused state before access key press");
+ pressAccessKey("x");
+ assert_false(v.paused, "paused state before access key press");
+});
+</script>
« no previous file with comments | « LayoutTests/media/activation-behavior.html ('k') | LayoutTests/media/activation-behavior-fullscreen.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698