-
Notifications
You must be signed in to change notification settings - Fork 351
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
feat(llrt_core): update URL/URLSearchParams to pass more web-platform-tests #447
Conversation
…t/web-platform-tests'
git-subtree-dir: tests/unit/web-platform-tests git-subtree-split: 39b61c36c99798acd2dddca5af76366f3ee7a36d
web-platform-tests contains a huge amount of files but we're only using a handful so let's not carry around the extra baggage
* origin/main: chore(deps-dev): bump the aws-cdk group with 2 updates (awslabs#444) chore(deps): bump quick-xml from 0.33.0 to 0.35.0 (awslabs#440) chore(deps): bump uuid from 1.9.0 to 1.9.1 (awslabs#441) chore(deps): bump aws-sdk from 2.1644.0 to 2.1651.0 (awslabs#446) chore(deps-dev): bump typescript from 5.4.5 to 5.5.2 (awslabs#445) Fix: Removed several module offerings (awslabs#439) feat: Implement of EventTarget (awslabs#436)
… null Both `clearTimeout` and `clearInterval` may be called with `null` (or any other value for that matter) which should be a no-op and return `undefined` rather than throwing an exception.
…-tests - Add the web-platformtests harness - Add web-platformtests for url - Update URL and URLSearchParams to pass mosts tests (using Url crate `quirks`), removing failing tests until the underlying issues in the Url crate are addressed
…e2b0119b 12e2b0119b [anchor] De-function <inset-area> within position-try-options 82f4f7d37c Correctly reject promise if failed to normalize algorithm 1edcc69f08 [WebDriverBiDi] Use JSON.stringify with fetch (#46892) 6a39784534 URL: add NFC normalization tests to toascii.json e8e62a51e8 Sync interfaces/ with @webref/idl 3.49.0 (#46729) d0e361adef compute pressure: Add WebPressureManager to Blink bf631b23b6 Bump docker/build-push-action from 5.4.0 to 6.1.0 0971d237c3 Fix input type for forward delete input event 67f02dca27 [wptrunner] add "--enable-features=WebMachineLearningNeuralNetwork" (#46891) 74798b941e webnn: update validation_tests to use opSupportLimits c267e5afc9 WebKit export of https://bugs.webkit.org/show_bug.cgi?id=275994 (#46944) abbe205166 WebKit export of https://bugs.webkit.org/show_bug.cgi?id=275993 (#46932) 639fa53694 Add support for AV1 to the MP4 muxer for MediaRecorde 591117c249 Fix content property tests in css/css-page/margin-boxes/ for Mac. f92d716815 Page margin at-rule CSSOM support. e4cf05764e serve: Fix exception in logger usage 0f5db42262 Fix various issues with :nth-child(... of S) invalidation. 20963ceaa9 Trim leading letter-spacing at start of line. c6273f7c68 Move tests to match the spec's move b2dab79f18 IDB WPTs: Extend IDBCursor continue() index WPTs to run on workers d8da9d4d1d Add support for data: blob: and blank to remote-content-helper. (#46893) 34c06943c2 Make SVG paths respect zoom. bc3e8ae808 Remove `httpRequestStatusCode` from test (#46874) git-subtree-dir: tests/unit/web-platform-tests git-subtree-split: 12e2b0119b769644c621b10bb953d4d47f299850
…twg-url * commit 'cef238d07ccdaf8663aa7ee4d9bc6a9fbc0269e0': Squashed 'tests/unit/web-platform-tests/' changes from 39b61c36c9..12e2b0119b
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.
This is great, thank you! 🎉 Most of the suggested edits are minor details, should be good to merge after.
Removing the regex check in favor of character checks to reduce dependencies
@richarddavison Thanks so much for the review! I've added a few commits to:
|
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.
Almost ready. Just some final questions then should be ready ! 👌
Issue
#437
Description of changes
Updates the
URL
andURLSearchParams
classes to pass a majority of the web-platform-tests.URL
andURLSearchParams
to pass most tests (using Url cratequirks
), removing failing tests until the underlying issues in the Url crate are addressedDesign
The Url crate is mostly compliant with the WHATWG URL standard except for a number of test cases around file URLs, Windows edge cases, and a few other scattered edge cases, and they have an undocumented
quirks
module that provides compatibility with web standards forURL
. To make it easy to leverage those features, and to avoid any derived state, bothURL
andURLSearchParams
operate on a sharedUrl
instance, effectively providing wrapper code around the Rust crate. This requires shared ownership of aUrl
with interior mutability and a little overhead with managing search params, but I think the benefits are worth it.Reviewing
web-platform-tests was added as a git subtree with all files removed except the ones currently needed, and several of the files have been modified for what's currently supported by
URL
andURLSearchParams
. It may be easier to look at commit diffs (ignoring the squash and merge commits of the subtree) than looking at the entire diff at once, at least to understand what's been changed about the web-platform tests.Checklist
tests/unit
and/or in Rust for my feature if neededmake fix
to format JS and apply Clippy auto fixesmake check
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.