| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>XMLHttpRequest: open() - open() (sync) - send()</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <div id="log"></div> |
| <script> |
| var test = async_test() |
| test.step(function() { |
| var client = new XMLHttpRequest(), |
| result = [], |
| expected = [1,1,4] |
| client.onreadystatechange = function() { |
| test.step(function() { |
| result.push(client.readyState) |
| }) |
| } |
| client.open("GET", "folder.txt") |
| client.open("GET", "folder.txt", false) |
| client.send(null) |
| assert_array_equals(result, expected) |
| test.done() |
| }) |
| </script> |
| </body> |
| </html> |