| <!DOCTYPE html> |
| <title>Tests that a text file is served as "text/plain".</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <video></video> |
| <script> |
| async_test(function(t) { |
| var video = document.querySelector("video"); |
| |
| var watcher = new EventWatcher(t, video, ["loadstart", "loadedmetadata", "error"]); |
| watcher.wait_for(["loadstart", "error"]).then(t.step_func_done()); |
| assert_equals(video.error, null); |
| |
| var movie = "resources/test.txt"; |
| video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + movie + "&throttle=99999&type=text/plain"; |
| }); |
| </script> |