chromium/third_party/blink/web_tests/fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer-expected.txt

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: Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set if the object's state is LOADING or DONE..
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: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer')..
PASS exception correctly thrown when xhr.responseXML is accessed but responseType is 'arraybuffer' : InvalidStateError: Failed to read the 'responseXML' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'document' (was 'arraybuffer')..
PASS xhr.response.foo is 'bar'
PASS successfullyParsed is true

TEST COMPLETE