haikuwebkit/LayoutTests/fetch/body-init-expected.txt

7 lines
178 B
Plaintext
Raw Permalink Normal View History

[Fetch API] TypeError when called with body === {} https://bugs.webkit.org/show_bug.cgi?id=173295 <rdar://problem/32746733> Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21 Reviewed by Sam Weinig. Source/WebCore: Test: fetch/body-init.html Handling body of Request and Response using binding generator to correctly handle unions. The biggest change is that any value that is not a specific type in the union will match a String. This is matching WebIDL spec and Firefox behavior. Handling of ReadableStream bodies remains in JS builtin for Response. This allows easier handling cloning and consumption of body. Adding setBodyAsReadableStream since this is no longer handled by extractBody. * Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::extract): Using Variant instead of JSC::JSValue. (WebCore::FetchBody::readableStreamBody): Introduced to handle the case of readable stream bodies. * Modules/fetch/FetchBody.h: * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::extractBody): * Modules/fetch/FetchBodyOwner.h: (WebCore::FetchBodyOwner::setBody): * Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::setBody): Splitting setBody for ease of readability. (WebCore::FetchRequest::setBodyFromInputRequest): * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchRequest.js: (initializeFetchRequest): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::initializeWith): (WebCore::FetchResponse::setBodyAsReadableStream): * Modules/fetch/FetchResponse.h: * Modules/fetch/FetchResponse.idl: * Modules/fetch/FetchResponse.js: (initializeFetchResponse): * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: LayoutTests: * fetch/body-init-expected.txt: Added. * fetch/body-init.html: Added. Canonical link: https://commits.webkit.org/190565@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-22 04:31:12 +00:00
PASS Testing integer body passed to response
PASS Testing object body passed to response
PASS Testing integer body passed to request
PASS Testing object body passed to request
[Fetch API] TypeError when called with body === {} https://bugs.webkit.org/show_bug.cgi?id=173295 <rdar://problem/32746733> Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21 Reviewed by Sam Weinig. Source/WebCore: Test: fetch/body-init.html Handling body of Request and Response using binding generator to correctly handle unions. The biggest change is that any value that is not a specific type in the union will match a String. This is matching WebIDL spec and Firefox behavior. Handling of ReadableStream bodies remains in JS builtin for Response. This allows easier handling cloning and consumption of body. Adding setBodyAsReadableStream since this is no longer handled by extractBody. * Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::extract): Using Variant instead of JSC::JSValue. (WebCore::FetchBody::readableStreamBody): Introduced to handle the case of readable stream bodies. * Modules/fetch/FetchBody.h: * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::extractBody): * Modules/fetch/FetchBodyOwner.h: (WebCore::FetchBodyOwner::setBody): * Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::setBody): Splitting setBody for ease of readability. (WebCore::FetchRequest::setBodyFromInputRequest): * Modules/fetch/FetchRequest.h: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchRequest.js: (initializeFetchRequest): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::initializeWith): (WebCore::FetchResponse::setBodyAsReadableStream): * Modules/fetch/FetchResponse.h: * Modules/fetch/FetchResponse.idl: * Modules/fetch/FetchResponse.js: (initializeFetchResponse): * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: LayoutTests: * fetch/body-init-expected.txt: Added. * fetch/body-init.html: Added. Canonical link: https://commits.webkit.org/190565@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-22 04:31:12 +00:00