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

[WebIDL] Add tests for function property enumeration order #30333

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Sep 3, 2021

webkit-commit-queue pushed a commit to WebKit/WebKit that referenced this pull request Sep 29, 2021
…erparts

https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This is being upstreamed at web-platform-tests/wpt#30333.

* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.js: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html: Added.

Source/WebCore:

This patch implements spec proposal [1] on matching property order of DOM constructors
with ECMA-262 functions: "length", "name", "prototype". Aligns WebKit with Blink and Gecko.
Also, groups property puts to remove 2 extra `$interface->isNamespaceObject` checks.

No behavior change except for enumeration order.

[1] whatwg/webidl#914

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html
       imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/*: Updated.


Canonical link: https://commits.webkit.org/242275@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cwiiis pushed a commit to Cwiiis/webkit-deprecated that referenced this pull request Oct 4, 2021
…erparts

https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This is being upstreamed at web-platform-tests/wpt#30333.

* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.js: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker-expected.txt: Added.
* web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html: Added.

Source/WebCore:

This patch implements spec proposal [1] on matching property order of DOM constructors
with ECMA-262 functions: "length", "name", "prototype". Aligns WebKit with Blink and Gecko.
Also, groups property puts to remove 2 extra `$interface->isNamespaceObject` checks.

No behavior change except for enumeration order.

[1] whatwg/webidl#914

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html
       imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/*: Updated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@283233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@ExE-Boss ExE-Boss changed the title WebIDL: Add tests for function property enumeration order [WebIDL] Add tests for function property enumeration order Oct 12, 2021
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Looks good. Might be good to add a comment that Blob is used here as one of many platform objects and has no special significance.

@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Mar 4, 2022

Note: I went with Blob because it’s what’s used in class‑string‑interface.any.js1, and that also doesn’t have any comment explaining why it was chosen:

"use strict";
test(() => {
assert_own_property(Blob.prototype, Symbol.toStringTag);

Footnotes

  1. Test new Web IDL class string behavior #23140

@Ms2ger Ms2ger merged commit 0642e19 into web-platform-tests:master Nov 21, 2022
@ExE-Boss ExE-Boss deleted the webidl/es-binding/pr-914 branch April 22, 2023 12:57
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