blob: 413f30371e710c5b7e59d136f1927378ee5f2d62 [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();
run('mediaElement.src = findMediaFile("video", "content/invalid")');
waitForEventOnce('error', error);
}
function error()
{
run('mediaElement.play().then(failTest).catch(promiseRejected)');
}
function promiseRejected(e)
{
error = e;
logResult(true, "Promise rejected.");
testExpected('error.name', 'NotSupportedError');
endTest();
}
</script>
</head>
<body onload="start()">
<video></video>
</body>
</html>