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

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

Issue 830183005: Re-enable the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simplify 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
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>

Powered by Google App Engine
This is Rietveld 408576698