Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Blob.prototype.bytes() #46232

Merged
merged 2 commits into from
May 24, 2024

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented May 13, 2024

Tests for w3c/FileAPI#197. That PR doesn't have stamps from all the implementations but Blob mostly mirrors Body, which is getting this method.

Copy link
Member

@inexorabletash inexorabletash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request May 24, 2024
https://bugs.webkit.org/show_bug.cgi?id=274119
rdar://128418858

Reviewed by Youenn Fablet.

This implements w3c/FileAPI#198 and
w3c/push-api#370 creating parity for these
APIs with Fetch's Body.

This incorporates the tests from
web-platform-tests/wpt#46232 modulo a typo fix.
PushMessageData test coverage is done through a local test that would
be good to upstream at some point.

* LayoutTests/http/wpt/push-api/pushEvent.any.js:
(test):
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/Blob-methods-from-detached-frame-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/Blob-methods-from-detached-frame.html:
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-bytes.any-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-bytes.any.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-bytes.any.js: Added.
(string_appeared_here.promise_test.async const):
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-bytes.any.worker-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-bytes.any.worker.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log:
* Source/WebCore/Modules/push-api/PushMessageData.cpp:
(WebCore::PushMessageData::arrayBuffer):
(WebCore::PushMessageData::bytes):
* Source/WebCore/Modules/push-api/PushMessageData.h:
* Source/WebCore/Modules/push-api/PushMessageData.idl:
* Source/WebCore/fileapi/Blob.cpp:
(WebCore::Blob::arrayBuffer):
(WebCore::Blob::bytes):
* Source/WebCore/fileapi/Blob.h:
* Source/WebCore/fileapi/Blob.idl:

Canonical link: https://commits.webkit.org/279263@main
@evilpie
Copy link
Contributor

evilpie commented May 24, 2024

Is this ready to be merge?

@annevk
Copy link
Member

annevk commented May 24, 2024

@evilpie if that means Mozilla is interested (nobody said anything on w3c/FileAPI#198) I think so, yes.

@annevk annevk merged commit cceaf36 into web-platform-tests:master May 24, 2024
19 checks passed
@bakkot bakkot deleted the blob-bytes branch May 24, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants