jer.noble@apple.com | f9a1b02 | 2017-07-14 17:33:28 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>video-add-autoplay-user-gesture</title> |
| 5 | <script src=media-file.js></script> |
| 6 | <script src=video-test.js></script> |
| 7 | <script> |
| 8 | function runTest() { |
| 9 | run('window.internals.settings.setVideoPlaybackRequiresUserGesture(true);'); |
| 10 | run('video = document.createElement("video")'); |
| 11 | run('video.src = findMediaFile("video", "content/test")'); |
| 12 | runWithKeyDown(() => { |
| 13 | run('video.setAttribute("autoplay", "")'); |
| 14 | run('document.body.appendChild(video)'); |
| 15 | waitForEventAndEnd('playing'); |
jer.noble@apple.com | f9a1b02 | 2017-07-14 17:33:28 +0000 | [diff] [blame] | 16 | }); |
| 17 | } |
| 18 | </script> |
| 19 | </head> |
| 20 | <body onload="runTest()"> |
| 21 | </body> |
| 22 | </html> |