| <title>XMLHttpRequest: open() after setRequestHeader()</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method"> |
| var client = new XMLHttpRequest() |
| client.onreadystatechange = function() { |
| if(client.readyState === 4){ |
| assert_equals(client.responseText, '') |
| client.open("GET", "resources/inspect-headers.py?filter_name=X-foo") |
| assert_equals(client.readyState, 1) |
| client.setRequestHeader('X-foo', 'bar') |
| client.open("GET", "resources/inspect-headers.py?filter_name=X-foo") |
| assert_equals(client.readyState, 1) |