| <title>video-main-content-allow</title> |
| <script src="video-test.js"></script> |
| <script src="media-file.js"></script> |
| mediaElement = video = document.createElement('video'); |
| // video.customProperty = 'custom'; |
| run('internals.setMediaElementRestrictions(video, "RequireUserGestureForVideoRateChange,OverrideUserGestureRequirementForMainContent")'); |
| video.src = findMediaFile('video', 'content/test'); |
| waitForEvent('canplaythrough', canPlayThrough); |
| function canPlayThrough() { |
| var promise = video.play(); |
| waitForEventAndFail('playing'); |
| setTimeout(didNotBeginPlaying, 100); |
| promise.catch(didNotBeginPlaying); |
| function didNotBeginPlaying() { |
| logResult(true, 'Did not begin playing'); |