blob: 46d8686bc08374e1bad20dd514f8c12ea7afabb2 [file] [log] [blame]
Philip Jägenstedtc053f402014-01-22 17:02:181<!doctype html>
2<html>
3 <head>
4 <title>XMLHttpRequest: timeout during sync send() should not run</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
Ms2ger91fef142014-11-01 09:24:377 <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method"/>
Philip Jägenstedtc053f402014-01-22 17:02:188 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 var test = async_test(),
13 hasrun = false
14 test.step(function() {
15 client = new XMLHttpRequest()
16 client.open("GET", "folder.txt", false)
Anne van Kesterenb9731da2017-02-21 14:18:3617 test.step_timeout(() => { hasrun = true }, 0)
Philip Jägenstedtc053f402014-01-22 17:02:1818 client.onreadystatechange = function() {
19 test.step(function() {
20 assert_equals(client.readyState, 4)
21 assert_false(hasrun)
22 })
23 }
24 client.send(null)
25 test.done()
26 })
27 </script>
28 </body>
29</html>