- a/Source/WebCore/ChangeLog +12 lines
Lines 1-5 a/Source/WebCore/ChangeLog_sec1
1
2016-08-05  Youenn Fablet  <youenn@apple.com>
1
2016-08-05  Youenn Fablet  <youenn@apple.com>
2
2
3
        [Fetch API] Response.blob should not assert in case the created blob is empty
4
        https://bugs.webkit.org/show_bug.cgi?id=160592
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Covered bu updated test.
9
10
        * Modules/fetch/FetchBodyConsumer.cpp:
11
        (WebCore::FetchBodyConsumer::takeAsBlob): Removing assertion as a response may have a body but with no data in it.
12
13
2016-08-05  Youenn Fablet  <youenn@apple.com>
14
3
        [Fetch API] Activate CSP checks
15
        [Fetch API] Activate CSP checks
4
        https://bugs.webkit.org/show_bug.cgi?id=160445
16
        https://bugs.webkit.org/show_bug.cgi?id=160445
5
17
- a/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp -1 lines
Lines 117-123 RefPtr<JSC::ArrayBuffer> FetchBodyConsumer::takeAsArrayBuffer() a/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp_sec1
117
117
118
Ref<Blob> FetchBodyConsumer::takeAsBlob()
118
Ref<Blob> FetchBodyConsumer::takeAsBlob()
119
{
119
{
120
    ASSERT(m_buffer);
121
    if (!m_buffer)
120
    if (!m_buffer)
122
        return Blob::create();
121
        return Blob::create();
123
122
- a/LayoutTests/imported/w3c/ChangeLog +10 lines
Lines 1-5 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2016-08-05  Youenn Fablet  <youenn@apple.com>
1
2016-08-05  Youenn Fablet  <youenn@apple.com>
2
2
3
        [Fetch API] Response.blob should not assert in case the created blob is empty
4
        https://bugs.webkit.org/show_bug.cgi?id=160592
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * web-platform-tests/fetch/api/request/request-consume-expected.txt:
9
        * web-platform-tests/fetch/api/request/request-consume.html: Adding response with empty blob test.
10
11
2016-08-05  Youenn Fablet  <youenn@apple.com>
12
3
        [Fetch API] Activate CSP checks
13
        [Fetch API] Activate CSP checks
4
        https://bugs.webkit.org/show_bug.cgi?id=160445
14
        https://bugs.webkit.org/show_bug.cgi?id=160445
5
15
- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt +1 lines
Lines 8-13 PASS Consume blob response's body as blob a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt_sec1
8
PASS Consume blob response's body as text 
8
PASS Consume blob response's body as text 
9
PASS Consume blob response's body as json 
9
PASS Consume blob response's body as json 
10
PASS Consume blob response's body as arrayBuffer 
10
PASS Consume blob response's body as arrayBuffer 
11
PASS Consume blob response's body as blob (empty blob as input) 
11
PASS Consume JSON from text: '"null"' 
12
PASS Consume JSON from text: '"null"' 
12
PASS Consume JSON from text: '"1"' 
13
PASS Consume JSON from text: '"1"' 
13
PASS Consume JSON from text: '"true"' 
14
PASS Consume JSON from text: '"true"' 
- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html +1 lines
Lines 91-96 a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html_sec1
91
    checkBlobResponseBody(blob, textData, "text", checkBodyText);
91
    checkBlobResponseBody(blob, textData, "text", checkBodyText);
92
    checkBlobResponseBody(blob, textData, "json", checkBodyJSON);
92
    checkBlobResponseBody(blob, textData, "json", checkBodyJSON);
93
    checkBlobResponseBody(blob, textData, "arrayBuffer", checkBodyArrayBuffer);
93
    checkBlobResponseBody(blob, textData, "arrayBuffer", checkBodyArrayBuffer);
94
    checkBlobResponseBody(new Blob([""]), "", "blob (empty blob as input)", checkBodyBlob);
94
95
95
    var goodJSONValues = ["null", "1", "true", "\"string\""];
96
    var goodJSONValues = ["null", "1", "true", "\"string\""];
96
    goodJSONValues.forEach(function(value) {
97
    goodJSONValues.forEach(function(value) {

Return to Bug 160592