blob: ff7e9c732ccc0f8109af3a15b7d2628e6280c584 [file] [log] [blame]
This tests that XMLHttpRequest open() disallows synchronous HTTP(S) requests when a non-default responseType is set.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
xhr.responseType = 'document';
PASS xhr.open('GET', 'http://mydomain/', false); threw exception InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest': synchronous HTTP requests from a document must not set a response type..
xhr.responseType = 'document';
PASS xhr.open('GET', 'https://mysecuredomain/', false); threw exception InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest': synchronous HTTP requests from a document must not set a response type..
PASS window.location.protocol is "file:"
xhr.responseType = 'document';
xhr.open('GET', window.location.href, false);
PASS xhr.responseType is "document"
xhr.responseType = 'document';
xhr.open('GET', dataUrl, false);
PASS xhr.responseType is "document"
PASS successfullyParsed is true
TEST COMPLETE