OLD | NEW |
1 This tests that XMLHttpRequest open() disallows synchronous HTTP(S) requests whe
n a non-default responseType is set. | 1 This tests that XMLHttpRequest open() disallows synchronous HTTP(S) requests whe
n a non-default responseType is set. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 xhr.responseType = 'document'; | 6 xhr.responseType = 'document'; |
7 PASS xhr.open('GET', 'http://mydomain/', false); threw exception InvalidAccessEr
ror: Failed to execute 'open' on 'XMLHttpRequest': Synchronous HTTP requests fro
m a document must not set a response type.. | 7 PASS xhr.open('GET', 'http://mydomain/', false); threw exception InvalidAccessEr
ror: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a d
ocument must not set a response type.. |
8 xhr.responseType = 'document'; | 8 xhr.responseType = 'document'; |
9 PASS xhr.open('GET', 'https://mysecuredomain/', false); threw exception InvalidA
ccessError: Failed to execute 'open' on 'XMLHttpRequest': Synchronous HTTP reque
sts from a document must not set a response type.. | 9 PASS xhr.open('GET', 'https://mysecuredomain/', false); threw exception InvalidA
ccessError: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests f
rom a document must not set a response type.. |
10 PASS window.location.protocol is "file:" | 10 PASS window.location.protocol is "file:" |
11 xhr.responseType = 'document'; | 11 xhr.responseType = 'document'; |
12 xhr.open('GET', window.location.href, false); | 12 PASS xhr.open('GET', window.location.href, false); threw exception InvalidAccess
Error: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a
document must not set a response type.. |
13 PASS xhr.responseType is "document" | |
14 xhr.responseType = 'document'; | 13 xhr.responseType = 'document'; |
15 xhr.open('GET', dataUrl, false); | 14 PASS xhr.open('GET', dataUrl, false); threw exception InvalidAccessError: Failed
to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document mus
t not set a response type.. |
16 PASS xhr.responseType is "document" | |
17 PASS successfullyParsed is true | 15 PASS successfullyParsed is true |
18 | 16 |
19 TEST COMPLETE | 17 TEST COMPLETE |
20 | 18 |
OLD | NEW |