| <title>Test that media autoplay should not work if user gesture is required for playback</title> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| window.internals.settings.setVideoPlaybackRequiresUserGesture(true); |
| failTest("play event should not fire without user gesture."); |
| testExpected("video.paused", true); |
| function canplaythrough() |
| setTimeout(testPaused, 100); |
| video.src = findMediaFile("video", "content/test"); |
| testExpected("video.paused", true); |
| waitForEvent('canplaythrough', canplaythrough); |
| waitForEvent('play', testPlay); |
| <p>Test that media autoplay should not work if user gesture is required for playback.</p> |
| <video controls autoplay></video> |