GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update web-platform tests by ninevra · Pull Request #3203 · jsdom/jsdom

Conversation

@ninevra

@ninevra ninevra commented Jun 11, 2021

Copy link
Copy Markdown
Contributor

Updates web-platform-tests, per #3200 (comment).

Let me know if I missed anything or did anything terribly wrong.

Interesting new test failures (with the caveat that I really don't know what I'm looking at or talking about here):

  • html/browsers/the-window-object:
    • window-indexed-properties-delete-no-cache.html: in jsdom, when the window has iframes, the numeric properties that refer to them (e.g. window[0]) can be deleted. Deletion should fail.
  • xhr:
    • formdata/constructor-formelement.html: formdata should normalize linebreaks to \n, but does not?
  • html/semantics/forms/the-textarea-element:
    • wrapping-transformation.window.html: TextArea normalizes newlines for the purpose of the value getter, but not the textContent getter?
  • html/semantics/embedded-content/the-img-element:
    • img-picture-ancestor.html, source-media-outside-doc.html: Img elements don't set their currentSrc in some cases; possibly related to media queries?
  • html/syntax:
    • xmldecl/xmldecl-*.html: looks like the content encoding of xml documents is being detected wrong?
  • shadow-dom:
    • imperative-slot-api*: tests for a new API (Slot.assign()) that jsdom doesn't implement yet?

Should issues be opened for any of the above?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ninevra added 20 commits June 9, 2021 10:38
@ninevra
Update web-platform-tests
f61347c
@ninevra
Remove to-run entries that don't match tests
5c2bd62
@ninevra
Re-add FileReader-multiple-reads as .any
7421f2f
@ninevra
Re-add filreader_result as .any
420f41f
@ninevra
Mark cssom-view/getBoundingClientRect-shy as unimplemented
3cf85eb
@ninevra
Failing AbortSignal.abort() cases moved to new file
2866f0e
@ninevra
Mark new test Event-timestamp-high-resolution.https.html as not imple…
fb03dd3
…mented
@ninevra
Mark an execution-timing test as passing
31b389d
@ninevra
Mark two shadow-dom tests as passing
4c676ac
@ninevra
Mark hr-time/clamped-time* as not implemented
d2ab5fc
@ninevra
Mark some new tests [fail, Unknown]
5adfda6
@ninevra
Mark failing: delete window[0] shouldn't remove iframes
0859f59
@ninevra
Mark failing: TextArea.textContent should be normalized and wrapped
ed3ed1f
@ninevra
Mark xmldecl tests failing with speculation
f5ab160
@ninevra
Mark some shadowdom tests not implemented
d4ba1c9
@ninevra
Mark new url tests dependent on fetch
d2563cf
@ninevra
Mark some websocket tests not implemented
82baf7e
@ninevra
Mark some formdata tests failing
b1be5eb
@ninevra
Restore note that FormDataEvent is not implemented
7a63fae
@ninevra
Update web-platform-tests again
e2c16cc
@TimothyGu

TimothyGu commented Jun 11, 2021

Copy link
Copy Markdown
Member

Thanks a lot for the hard work in triaging the new tests!

  • html/browsers/the-window-object:

    • window-indexed-properties-delete-no-cache.html: in jsdom, when the window has iframes, the numeric properties that refer to them (e.g. window[0]) can be deleted. Deletion should fail.

This is probably hard to fix, as the deletion behavior is specified by WindowProxy's [[Delete]] abstract operation, which we can't override without making WindowProxy a Proxy object (which is hard). (We also can't make numeric properties non-configurable, since we need to be able to delete the properties ourselves when an iframe gets detached.)

  • xhr:

    • formdata/constructor-formelement.html: formdata should normalize linebreaks to \n, but does not?

This probably has to do with whatwg/html#6287, part of https://blog.whatwg.org/newline-normalizations-in-form-submission. We probably have to adjust our own code to conform.

  • html/semantics/forms/the-textarea-element:

    • wrapping-transformation.window.html: TextArea normalizes newlines for the purpose of the value getter, but not the textContent getter?

Probably related to the FormData test above. The spec now says "The algorithm for obtaining the element's API value is to return the element's raw value, with newlines normalized." The value getter returns the element's API value.

  • html/semantics/embedded-content/the-img-element:

    • img-picture-ancestor.html, source-media-outside-doc.html: Img elements don't set their currentSrc in some cases; possibly related to media queries?

Not sure. We don't support media queries particularly well.

  • html/syntax:

    • xmldecl/xmldecl-*.html: looks like the content encoding of xml documents is being detected wrong?

This is probably https://github.com/whatwg/html/pull/1752/files, which creates the get an XML encoding algorithm. That'll have to be fixed in https://github.com/jsdom/html-encoding-sniffer.

  • shadow-dom:

    • imperative-slot-api*: tests for a new API (Slot.assign()) that jsdom doesn't implement yet?

Let's create an issue for this.


Should issues be opened for any of the above?

Usually we fix simple issues in the same PR as the WPT roll. Unless the test is too hard to enable, in which case we just add the expectations in the to-run YAML file.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimothyGu
TimothyGu reviewed Jun 11, 2021
View reviewed changes

@TimothyGu TimothyGu left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good for the most part.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/web-platform-tests/to-run.yaml Resolved

Uh oh!

There was an error while loading. Please reload this page.

ninevra added 2 commits June 14, 2021 10:42
@ninevra
Implement AbortSignal.abort() with circular require().
e675ddb
@ninevra
Directly set abortSignal.aborted
b31e43d
@ninevra

ninevra commented Jun 14, 2021

Copy link
Copy Markdown
Contributor Author

It looks like the tests are completing successfully in about 25 minutes, but not exiting, causing CI to time out after 6 hours.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ninevra added 5 commits June 14, 2021 13:27
@ninevra
Re-enable formdata tests
561aad0
@ninevra
Normalize textarea form value with lf, not crlf
2b89f74
@ninevra
Implement textarea wrapping
df6f262
@ninevra
Don't normalize names in appendAnEntry
07db989
@ninevra
Don't normalize values in appendAnEntry
c198622
@ninevra
Remove unused normalizeToCRLF
2ba7264
@ninevra

ninevra commented Jun 14, 2021

Copy link
Copy Markdown
Contributor Author

Implemented the FormData and TextArea changes; newlines are no longer normalized to CRLF, since the spec changes deferred that process to the actual encoding step. Implemented the textarea wrapping transformation, wrapping textarea content to at most cols characters per line, not including newlines. Re-enabled the two corresponding tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu

TimothyGu commented Jun 14, 2021

Copy link
Copy Markdown
Member

It looks like the tests are completing successfully in about 25 minutes, but not exiting, causing CI to time out after 6 hours.

Could you reproduce this timeout locally? If so, you could try using why-is-node-running or wtfnode to help debug what's preventing the process from exiting.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ninevra
Use SIGINT to kill the server process.
c7e4b39
See the comment at start-wpt-server.js lines 56-57.
@ninevra

ninevra commented Jun 15, 2021

Copy link
Copy Markdown
Contributor Author

It looks like the tests are completing successfully in about 25 minutes, but not exiting, causing CI to time out after 6 hours.

Could you reproduce this timeout locally? If so, you could try using why-is-node-running or wtfnode to help debug what's preventing the process from exiting.

I can reproduce the timeout locally. I'm messing around with wtfnode and haven't learned anything conclusive yet. After running yarn test, there are two start-wpt-server.js child processes, presumably one for tuwpt and one for wpt, and five sockets connected to port 9000. I'll keep looking into this if/when I have time.

However, in the process I did find a strange inconsistency and possible solution:

jsdom/test/web-platform-tests/start-wpt-server.js

Lines 55 to 59 in 0024630

process.on("exit", () => {
// Python doesn't register a default handler for SIGTERM and it doesn't run __exit__() methods of context
// managers when it gets that signal. Using SIGINT avoids this problem.
subprocess.kill("SIGINT");
});
notes that SIGINT is necessary to kill the test server, but the after() hook in

jsdom/test/web-platform-tests/run-wpts.js

Lines 51 to 53 in 0024630

after(() => {
serverProcess.kill();
});
instead uses the default, SIGTERM, which the test server presumably ignores.

Changing the latter to SIGINT appears to cause the test server to exit normally.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ninevra

ninevra commented Jun 15, 2021

Copy link
Copy Markdown
Contributor Author

The remaining CI failures occur in a new test that uses globalThis, which doesn't exist on node 10. Could solve this by:

  • have jsdom define globalThis in the vm even if it doesn't exist in the node environment;
  • add a mechanism for setting test expectations conditionally on the node version;
  • add a mechanism for expecting either pass or fail from a given subtest;
  • mark the whole test fail-slow;
  • drop Node 10, given it's EOL

Thoughts?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@domenic

domenic commented Jun 15, 2021

Copy link
Copy Markdown
Member

Dropping Node 10 is planned; you can proceed assuming this will get merged after #3192

ninevra reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu

TimothyGu commented Jun 15, 2021

Copy link
Copy Markdown
Member

@ninevra We do have the capability of marking the test as conditional on a Node.js version through needs-node10. Or we can wait it out, like @domenic mentioned :)

ninevra reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ninevra
Mark two FileAPI tests needs-node12
37ea991
Both check on globalThis, which is only present on node 12+.
@TimothyGu
TimothyGu merged commit 346ea98 into jsdom:master Jun 15, 2021
@TimothyGu TimothyGu mentioned this pull request Jun 16, 2021
Start requiring Node.js v12 or higher #3192
Merged
@ninevra

ninevra commented Jun 17, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @TimothyGu for all the help & guidance on this PR, the pointers to the various specs were really helpful and I'm glad I was able to contribute!

TimothyGu reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sync-by-unito sync-by-unito Bot mentioned this pull request Jun 24, 2022
Bump jsdom from 16.4.0 to 16.7.0 privacyresearchgroup/UProveTS#21
Open
@sawmurai sawmurai mentioned this pull request Apr 20, 2024
Slots in loops only assigned once when component used as custom element vuejs/core#10691
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TimothyGu TimothyGu TimothyGu left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ninevra @TimothyGu @domenic
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.