XHR.response is null when requesting empty file as arraybuffer
https://bugs.webkit.org/show_bug.cgi?id=123457

Source/WebCore:

Reviewed by Sam Weinig.

Test: http/tests/xmlhttprequest/response-empty-arraybuffer.html

* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseArrayBuffer): Don't do this.

LayoutTests:

Based on a Blink test by yusukesuzuki@chromium.org.

Reviewed by Sam Weinig.

Failures in expected results appear to mean that Blink caches XHR responses in more
cases. It's not directly related to the patch.

* http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt: Added.
* http/tests/xmlhttprequest/response-empty-arraybuffer.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed