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 | 11 |
12 function click() | 12 function click() |
13 { | 13 { |
14 if (window.eventSender) { | 14 if (window.eventSender) { |
15 var playCoords; | 15 var playCoords; |
16 try { | 16 try { |
17 playCoords = mediaControlsButtonCoordinates(video, "play
-button"); | 17 playCoords = mediaControlsButtonCoordinates(video, "play
-button"); |
18 } catch (exception) { | 18 } catch (exception) { |
19 failTest(exception.description); | 19 failTest(exception.description); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 video.src = findMediaFile("video", "content/test"); | 74 video.src = findMediaFile("video", "content/test"); |
75 } | 75 } |
76 </script> | 76 </script> |
77 </head> | 77 </head> |
78 | 78 |
79 <body onload="start()"> | 79 <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> | 80 <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> | 81 <video controls></video> |
82 </body> | 82 </body> |
83 </html> | 83 </html> |
OLD | NEW |