| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Verify that a timeout ProgressEvent is dispatched and have the expected v
alues.</title> |
| 4 <script src="../resources/testharness.js"></script> | 5 <script src="../resources/testharness.js"></script> |
| 5 <script src="../resources/testharnessreport.js"></script> | 6 <script src="../resources/testharnessreport.js"></script> |
| 6 </head> | 7 </head> |
| 7 <body> | 8 <body> |
| 8 <p>Verify that a timeout ProgressEvent is dispatched and have the expected value
s.</p> | |
| 9 <div id="logEvent"></div> | 9 <div id="logEvent"></div> |
| 10 <script type="text/javascript"> | 10 <script type="text/javascript"> |
| 11 var didTimeout = false; | 11 var didTimeout = false; |
| 12 | 12 |
| 13 function timeoutEvent(e) { | 13 function timeoutEvent(e) { |
| 14 didTimeout = true; | 14 didTimeout = true; |
| 15 } | 15 } |
| 16 | 16 |
| 17 function unexpectedProgressEvent(e) { | 17 function unexpectedProgressEvent(e) { |
| 18 assert_unreached("'" + e.type + "' event should not be dispatched, expected
'timeout'"); | 18 assert_unreached("'" + e.type + "' event should not be dispatched, expected
'timeout'"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 xhr.open("GET", "../resources/load-and-stall.php?name=test.mp4&stallAt=0&sta
llFor=1000&mimeType=video/mp4", true); | 33 xhr.open("GET", "../resources/load-and-stall.php?name=test.mp4&stallAt=0&sta
llFor=1000&mimeType=video/mp4", true); |
| 34 xhr.send(); | 34 xhr.send(); |
| 35 // Defer overriding timeout | 35 // Defer overriding timeout |
| 36 setTimeout(function() { | 36 setTimeout(function() { |
| 37 xhr.timeout = 400; | 37 xhr.timeout = 400; |
| 38 }, 200); | 38 }, 200); |
| 39 }); | 39 }); |
| 40 </script> | 40 </script> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |