jer.noble@apple.com | e63d96d | 2016-03-10 00:22:12 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>video-main-content-allow</title> |
| 5 | <script src="video-test.js"></script> |
| 6 | <script src="media-file.js"></script> |
| 7 | <script> |
| 8 | function go() { |
| 9 | mediaElement = video = document.createElement('video'); |
| 10 | // video.customProperty = 'custom'; |
jer.noble@apple.com | 75a4eb8 | 2016-03-10 21:35:10 +0000 | [diff] [blame] | 11 | run('internals.setMediaElementRestrictions(video, "RequireUserGestureForVideoRateChange,OverrideUserGestureRequirementForMainContent")'); |
jer.noble@apple.com | e63d96d | 2016-03-10 00:22:12 +0000 | [diff] [blame] | 12 | |
| 13 | video.src = findMediaFile('video', 'content/test'); |
| 14 | waitForEvent('canplaythrough', canPlayThrough); |
| 15 | } |
| 16 | |
| 17 | function canPlayThrough() { |
| 18 | video.play(); |
| 19 | waitForEventAndFail('playing'); |
| 20 | setTimeout(didNotBeginPlaying, 100); |
| 21 | } |
| 22 | |
| 23 | function didNotBeginPlaying() { |
| 24 | logResult(true, 'Did not begin playing'); |
| 25 | endTest(); |
| 26 | } |
| 27 | </script> |
| 28 | <style> |
| 29 | video { |
| 30 | width: 600px; |
| 31 | height: 400px; |
| 32 | } |
| 33 | </style> |
| 34 | </head> |
| 35 | <body onload="go()"> |
| 36 | </body> |
| 37 | </html> |