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

Side by Side Diff: LayoutTests/media/video-play-require-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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Test that video play, pause and enterfullscreen does not work unl ess a user gesture is involved in playing a video</title> 3 <title>Test that video play, pause and enterfullscreen does not work unl ess a user gesture is involved in playing a video</title>
4 <script src=media-controls.js></script> 4 <script src=media-controls.js></script>
5 <script src=media-file.js></script> 5 <script src=media-file.js></script>
6 <script src=video-test.js></script> 6 <script src=video-test.js></script>
7 <script> 7 <script>
8 var userGestureInitiated = 0; 8 var userGestureInitiated = 0;
9 if (window.internals) 9 if (window.internals) {
10 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr ue); 10 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr ue);
11 window.internals.settings.setMediaFullscreenRequiresUserGesture( true);
abarth-chromium 2013/09/11 18:26:51 Isn't this the default? Why do we need to set it
whywhat 2013/09/11 21:11:42 Done.
12 }
11 13
12 function click() 14 function click()
13 { 15 {
14 if (window.eventSender) { 16 if (window.eventSender) {
15 var playCoords; 17 var playCoords;
16 try { 18 try {
17 playCoords = mediaControlsButtonCoordinates(video, "play -button"); 19 playCoords = mediaControlsButtonCoordinates(video, "play -button");
18 } catch (exception) { 20 } catch (exception) {
19 failTest(exception.description); 21 failTest(exception.description);
20 return; 22 return;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 video.src = findMediaFile("video", "content/test"); 76 video.src = findMediaFile("video", "content/test");
75 } 77 }
76 </script> 78 </script>
77 </head> 79 </head>
78 80
79 <body onload="start()"> 81 <body onload="start()">
80 <p>Test that video play(), pause() and webkitEnterFullScreen() should not wo rk unless a user clicked on the play button.</p> 82 <p>Test that video play(), pause() and webkitEnterFullScreen() should not wo rk unless a user clicked on the play button.</p>
81 <video controls></video> 83 <video controls></video>
82 </body> 84 </body>
83 </html> 85 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698