blob: 11346421cd1752dcdd7c01f3ab365a15912dab8c [file] [log] [blame]
Tests XMLHttpRequest 'arraybuffer' loading with the .responseType and .response attributes.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 'arraybuffer' .response does not exist when .readyState is 1.
PASS responseType property exists.
PASS response property exists.
PASS xhr.responseType is initially set to default value of empty string.
PASS xhr.responseType has been correctly set to ''.
PASS xhr.responseType has been correctly set to 'text'.
PASS xhr.responseType has been correctly set to 'document'.
PASS xhr.responseType has been correctly set to 'arraybuffer'.
PASS 'arraybuffer' .response does not exist when .readyState is 2.
PASS 'arraybuffer' .response does not exist when .readyState is 3.
PASS 'arraybuffer' .response exists when .readyState is 4.
PASS DONE LOADING
PASS received response object : [object ArrayBuffer].
PASS exception correctly thrown when xhr.responseType is set to valid value too late in the loading process : InvalidStateError: The object is in an invalid state..
response length : 670184.
bytes at offset 0 : 46 4f 52 4d 0 a 39 e0
bytes at offset 356874 : a 91 f 5f 8 2f e fd
bytes at offset 670166 : 8 be 3 c 6 91 2 8
checksum : 84637740
PASS exception correctly thrown when xhr.responseText is accessed but responseType is 'arraybuffer' : InvalidStateError: The object is in an invalid state..
PASS exception correctly thrown when xhr.responseXML is accessed but responseType is 'arraybuffer' : InvalidStateError: The object is in an invalid state..
PASS xhr.response.foo is 'bar'
PASS successfullyParsed is true
TEST COMPLETE