blob: 413f30371e710c5b7e59d136f1927378ee5f2d62 [file] [log] [blame]
jer.noble@apple.com8766aa22016-05-10 20:32:02 +00001<!DOCTYPE html>
2<html>
3 <head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6
7 <script>
8 var promise;
9 var error;
10 function start()
11 {
12 findMediaElement();
13 run('mediaElement.src = findMediaFile("video", "content/invalid")');
14 waitForEventOnce('error', error);
15 }
16
17 function error()
18 {
19 run('mediaElement.play().then(failTest).catch(promiseRejected)');
20 }
21
22 function promiseRejected(e)
23 {
24 error = e;
25 logResult(true, "Promise rejected.");
26 testExpected('error.name', 'NotSupportedError');
27 endTest();
28 }
29 </script>
30 </head>
31
32 <body onload="start()">
33
34 <video></video>
35
36 </body>
37</html>