OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> |
| 5 |
| 6 <script> |
| 7 async_test(t => { |
| 8 const url = 'http://localhost:8000/xmlhttprequest/resources/access-control-a
llow-with-delay.php'; |
| 9 const xhr = new XMLHttpRequest(); |
| 10 xhr.open('GET', url); |
| 11 xhr.setRequestHeader('foo', 'bar'); |
| 12 xhr.timeout = 1500; |
| 13 xhr.ontimeout = t.step_func_done(() => { |
| 14 assert_equals(xhr.readyState, 4); |
| 15 }); |
| 16 xhr.onload = t.unreached_func('load event fired'); |
| 17 xhr.send(); |
| 18 }, 'CORS preflight and the actual request should use the same timer'); |
| 19 </script> |
OLD | NEW |