-
Notifications
You must be signed in to change notification settings - Fork 333
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
WPT: Add dom/abortsignal tests #3436
base: main
Are you sure you want to change the base?
Conversation
}, | ||
'event.any.js': { | ||
comment: 'Target should be set to signal', | ||
expectedFailures: ['the abort event should have the right properties'], |
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.
The event has target = undefined
and currentTarget = signal
. I'm not sure if I'm doing something wrong in the harness or if we have a bug.
expectedFailures: [ | ||
'AbortSignal.any() follows a single signal (using AbortController)', | ||
'AbortSignal.any() follows multiple signals (using AbortController)', | ||
'Abort events for AbortSignal.any() signals fire in the right order (using AbortController)', |
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.
Quick link to the relevant bit for the "signals fire in the right order" test:
Bad news: I have a Windows build failure too now. |
Great work, will review tomorrow. |
|
||
[filegroup( | ||
name = dir, | ||
srcs = glob(["{}/**/*".format(dir)]), | ||
visibility = ["//visibility:public"], | ||
) for dir in directories] | ||
) for dir in wpt_get_directories("dom")] |
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.
Why does this only mentions "dom"?
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.
I want to have a hierarchy under dom because having one huge dom-test.ts
seems hard to work with. So this creates a dom/
directory so we can have dom/abort-test.ts
. dom is the only module that I'm breaking out so far. But we'll see if we need a different hierarchy as we enable more modules.
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.
I mean previously this was checking all directories. Right now it's checking only for dom?
if (testCase.error) { | ||
globalThis.errors.push(testCase.error); | ||
} |
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.
line 438 and 449 does the same exact thing. doesn't this duplicate the errors?
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.
Yeah this is a bit messy. I'll try to rework this.
if (testCase.error) { | ||
globalThis.errors.push(testCase.error); | ||
} |
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.
How can a test you just created can have an error property?
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.
The function passed to promise_test
needs to return a Promise
but is not required to be an async function
, so if some exception is thrown before it returns the Promise that exception would be caught immediately in step
.
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.
Can you add this as a comment?
f8068f9
to
c6c1c3b
Compare
c6c1c3b
to
ad5a7aa
Compare
Enables tests from the dom/abortsignal module from WPT.
The following features were added to the harness to support these tests:
Test
class, including step, step_func, step_timeout, step_func_done and doneasync_test
test type