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