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

Unified Diff: LayoutTests/media/video-enter-fullscreen-without-user-gesture.html

Issue 23440027: Added a new runtime setting for RequireUserGestureForFullscreenRestriction. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed the -actual.txt by appending two blank lines. Created 7 years, 3 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 | « no previous file | LayoutTests/media/video-enter-fullscreen-without-user-gesture-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
diff --git a/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html b/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
new file mode 100644
index 0000000000000000000000000000000000000000..4d27f0e9e52cbcde4fff9c20f11e37e607852e1c
--- /dev/null
+++ b/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
@@ -0,0 +1,40 @@
+<html>
+ <head>
+ <title>Test that video webkitEnterFullScreen() works without any user gesture if the requirement is removed.</title>
+ <script src=media-controls.js></script>
+ <script src=media-file.js></script>
+ <script src=video-test.js></script>
+ <script>
+ if (window.internals)
+ window.internals.settings.setMediaFullscreenRequiresUserGesture(false);
+
+ function canplaythrough()
+ {
+ consoleWrite("");
+ consoleWrite("* No user gesture initiated");
+ testExpected("video.paused", true);
+ // Now video.webkitEnterFullScreen() should no longer throw any exception.
+ // However, the video element may not always enter fullscreen. For example,
+ // chromium uses fullscreen API which still requires user gesture
+ try {
+ run("video.webkitEnterFullScreen()");
+ } catch(ex) {
+ failTest("video.webkitEnterFullScreen() still requires user gesture.");
+ }
+ endTest();
+ }
+
+ function start()
+ {
+ findMediaElement();
+ waitForEvent('canplaythrough', canplaythrough);
+ video.src = findMediaFile("video", "content/test");
+ }
+ </script>
+ </head>
+
+ <body onload="start()">
+ <p>Test that video webkitEnterFullScreen() works without any user gesture if the requirement is removed.</p>
+ <video controls></video>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/media/video-enter-fullscreen-without-user-gesture-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698