blob: 995314bc10ec9e90127071f99af9cd0551f417cb [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 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 requests from a document must not set a response type..
PASS window.location.protocol is "file:"
xhr.responseType = 'document';
PASS xhr.open('GET', window.location.href, false); threw exception InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document must not set a response type..
xhr.responseType = 'document';
PASS xhr.open('GET', dataUrl, false); threw exception InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document must not set a response type..
PASS successfullyParsed is true
TEST COMPLETE