OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <title>Test that video webkitEnterFullScreen() works without any user ge
sture if the requirement is removed.</title> |
| 4 <script src=media-controls.js></script> |
| 5 <script src=media-file.js></script> |
| 6 <script src=video-test.js></script> |
| 7 <script> |
| 8 if (window.internals) |
| 9 window.internals.settings.setMediaFullscreenRequiresUserGesture(
false); |
| 10 |
| 11 function canplaythrough() |
| 12 { |
| 13 consoleWrite(""); |
| 14 consoleWrite("* No user gesture initiated"); |
| 15 testExpected("video.paused", true); |
| 16 // Now video.webkitEnterFullScreen() should no longer throw any
exception. |
| 17 // However, the video element may not always enter fullscreen. F
or example, |
| 18 // chromium uses fullscreen API which still requires user gestur
e |
| 19 try { |
| 20 run("video.webkitEnterFullScreen()"); |
| 21 } catch(ex) { |
| 22 failTest("video.webkitEnterFullScreen() still requires user
gesture."); |
| 23 } |
| 24 endTest(); |
| 25 } |
| 26 |
| 27 function start() |
| 28 { |
| 29 findMediaElement(); |
| 30 waitForEvent('canplaythrough', canplaythrough); |
| 31 video.src = findMediaFile("video", "content/test"); |
| 32 } |
| 33 </script> |
| 34 </head> |
| 35 |
| 36 <body onload="start()"> |
| 37 <p>Test that video webkitEnterFullScreen() works without any user gesture if
the requirement is removed.</p> |
| 38 <video controls></video> |
| 39 </body> |
| 40 </html> |
OLD | NEW |