OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Test that video webkitEnterFullScreen() works without any user ge
sture if the requirement is removed.</title> | 3 <title>Test that video webkitRequestFullscreen() works without any user
gesture if the requirement is removed.</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 if (window.internals) | 8 if (window.internals) |
9 window.internals.settings.setMediaFullscreenRequiresUserGesture(
false); | 9 window.internals.settings.setMediaFullscreenRequiresUserGesture(
false); |
10 | 10 |
11 function canplaythrough() | 11 function canplaythrough() |
12 { | 12 { |
13 consoleWrite(""); | 13 consoleWrite(""); |
14 consoleWrite("* No user gesture initiated"); | 14 consoleWrite("* No user gesture initiated"); |
15 testExpected("video.paused", true); | 15 testExpected("video.paused", true); |
16 run("video.webkitEnterFullScreen()"); | 16 run("video.webkitRequestFullscreen()"); |
17 waitForEvent('webkitfullscreenchange', fullscreenchange); | 17 waitForEvent('webkitfullscreenchange', fullscreenchange); |
18 } | 18 } |
19 | 19 |
20 function fullscreenchange() | 20 function fullscreenchange() |
21 { | 21 { |
22 endTest(); | 22 endTest(); |
23 } | 23 } |
24 | 24 |
25 function start() | 25 function start() |
26 { | 26 { |
27 findMediaElement(); | 27 findMediaElement(); |
28 waitForEvent('canplaythrough', canplaythrough); | 28 waitForEvent('canplaythrough', canplaythrough); |
29 video.src = findMediaFile("video", "content/test"); | 29 video.src = findMediaFile("video", "content/test"); |
30 } | 30 } |
31 </script> | 31 </script> |
32 </head> | 32 </head> |
33 | 33 |
34 <body onload="start()"> | 34 <body onload="start()"> |
35 <p>Test that video webkitEnterFullScreen() works without any user gesture if
the requirement is removed.</p> | 35 <p>Test that video webkitRequestFullscreen() works without any user gesture
if the requirement is removed.</p> |
36 <video controls></video> | 36 <video controls></video> |
37 </body> | 37 </body> |
38 </html> | 38 </html> |
OLD | NEW |