OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>text file served as 'text/plain'</title> | 4 <title>text file served as 'text/plain'</title> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 6 (Please avoid writing new tests using video-test.js) --> |
5 <script src=../../media-resources/video-test.js></script> | 7 <script src=../../media-resources/video-test.js></script> |
6 <script> | 8 <script> |
7 function loadedmetadata(evt) | 9 function loadedmetadata(evt) |
8 { | 10 { |
9 logResult(false, "loaded text file served as text"); | 11 logResult(false, "loaded text file served as text"); |
10 endTest(); | 12 endTest(); |
11 } | 13 } |
12 | 14 |
13 function error(evt) | 15 function error(evt) |
14 { | 16 { |
15 logResult(true, "failed trying to load text file served as text"
); | 17 logResult(true, "failed trying to load text file served as text"
); |
16 endTest(); | 18 endTest(); |
17 } | 19 } |
18 | 20 |
19 function start() | 21 function start() |
20 { | 22 { |
21 findMediaElement(); | 23 findMediaElement(); |
22 | 24 |
23 waitForEvent('loadedmetadata', loadedmetadata); | 25 waitForEvent('loadedmetadata', loadedmetadata); |
24 waitForEvent("error", error); | 26 waitForEvent("error", error); |
25 waitForEvent("loadstart"); | 27 waitForEvent("loadstart"); |
26 testExpected("video.error", null); | 28 testExpected("video.error", null); |
27 | 29 |
28 var movie = "resources/test.txt"; | 30 var movie = "resources/test.txt"; |
29 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cg
i?name=" + movie + "&throttle=99999&type=text/plain"; | 31 video.src = "http://127.0.0.1:8000/media/video-throttled-load.cg
i?name=" + movie + "&throttle=99999&type=text/plain"; |
30 } | 32 } |
31 </script> | 33 </script> |
32 </head> | 34 </head> |
33 | 35 |
34 <body onload="start()"> | 36 <body onload="start()"> |
35 <video controls></video> | 37 <video controls></video> |
36 </body> | 38 </body> |
37 </html> | 39 </html> |
OLD | NEW |