OLD | NEW |
---|---|
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 Loading... | |
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> |
OLD | NEW |