blob: f789e920a06f3868401d0e4b62e04c8c1dd84910 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
var promise;
var error;
function start()
{
findMediaElement();
if (window.internals)
run('internals.setMediaElementRestrictions(mediaElement, "RequireUserGestureForVideoRateChange")');
run('mediaElement.src = findMediaFile("video", "content/test")');
run('mediaElement.play().then(failTest).catch(promiseRejected)');
}
function promiseRejected(e)
{
error = e;
logResult(true, "Promise rejected.");
testExpected('error.name', 'NotAllowedError');
endTest();
}
</script>
</head>
<body onload="start()">
<video></video>
</body>
</html>