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

Run Web Platform Tests against the polyfill. #88

Merged
merged 6 commits into from
Nov 30, 2020

Conversation

koddsson
Copy link
Collaborator

This PR implements a test harness set up so that we are able to run Web Platform Tests against the polyfill. These tests are a good indicator of if the polyfill is fulfilling the spec since browser vendors use these tests to make sure that their implementations are matching the spec and each others implementation.

This change just pulls in a single test suite but I'll be building up a framework so that we can pull in all the cookie store tests and vendor them into the repo. The single test suite that this PR pulls in is wpt/cookie-store/cookieStore_get_arguments.tentative.https.any.html.

I had to make some modifications since the tests didn't run green from the beginning but I believe my changes align us closer to the spec.

cc/ @keithamus

Copy link
Collaborator

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

👍 this looks great. It'd be great to automatically pull in the test suite with a command to make sure we can reliably pull any changes to WPT, of course, after all the tests get added 😉

@keithamus keithamus merged commit 4a9655b into markcellus:master Nov 30, 2020
@koddsson koddsson deleted the wpt-tests branch December 3, 2020 14:37
markcellus pushed a commit that referenced this pull request Aug 18, 2022
* Throw TypeError if get is called without arguments

See step 4 in "The get(options) method" section in the [CookieStore
Spec][cookiestore]:

>If options is empty, then return a promise rejected with a TypeError.

[cookiestore]: https://wicg.github.io/cookie-store/#ref-for-dom-cookiestore-get-options%E2%91%A4

* Refactor sanitizeOptions to use TypeScript generics

* Implement getting a cookie by URL

* Add cookieStore get arguments WPT tests

* Set `assert_equals` variable directly

* Actually parse URL and check its origin
markcellus pushed a commit that referenced this pull request Aug 18, 2022
* Throw TypeError if get is called without arguments

See step 4 in "The get(options) method" section in the [CookieStore
Spec][cookiestore]:

>If options is empty, then return a promise rejected with a TypeError.

[cookiestore]: https://wicg.github.io/cookie-store/#ref-for-dom-cookiestore-get-options%E2%91%A4

* Refactor sanitizeOptions to use TypeScript generics

* Implement getting a cookie by URL

* Add cookieStore get arguments WPT tests

* Set `assert_equals` variable directly

* Actually parse URL and check its origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants