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
canceling-an-animation.html has a harness error in all browsers #18932
Comments
This is due to this test: test(t => {
const animation = createDiv(t).animate(null);
const promise = animation.ready;
animation.cancel();
assert_not_equals(animation.ready, promise);
}, 'The ready promise should be replaced when the animation is canceled'); The promise_rejects(t, 'AbortError', promise, 'Cancel should abort ready promise'); |
Aha, thanks @graouts! If there are other tests that check that |
Oh, sorry, it's not the return value of |
@birtles does it sound right to you to make this change? |
It sounds right to me, if that helps :). Canceling an animation runs the reset an animation's pending tasks steps, which includes rejecting the ready promise. |
I updated the test, I think this closes this issue. |
That's what I like to hear! Next step is to fix this last assertion in Safari. |
The change seems fine. I'm not sure if I agree with having the test harness error on unhandled Promise rejections, however. |
This happens here: Lines 3368 to 3399 in 152adb0
As you can see, uncaught exceptions are given the same treatment as unhandled rejections. Both can be disabled with Is there something you think should change here? |
It's a bit odd because it means the test ends up testing more than it should in this case. I suppose on balance, though, there are probably more tests that benefit from having the unhandled rejection check than those that are complicated by it, so maybe it's fine. |
Sounds like you would have preferred the fix I suggested in #18932 (comment)? I'll leave it to the reviewers of this directory to decide what's best here, but if there is anything we can improve on the infra side please let us know. I filed #19021 about this issue being too hard to understand, with a better message I could have spotted the problem and sent a PR directly. |
That wouldn't work, Maybe there's a setup API we could call instead to suppress the harness error. |
Uh, make that just |
Yeah, that would work. @birtles, would you prefer this over the patch I made with the extra assertion? |
No, what you have is fine. I was just more concerned about if we have to do this a lot. |
https://staging.wpt.fyi/results/web-animations/timing-model/animations/canceling-an-animation.html?run_id=227500002&run_id=259130004&run_id=253190002&run_id=247230003
Chrome and Edge have a harness error saying "The user aborted a request" and Firefox and Safari say "The operation was aborted".
@birtles @flackr @graouts @stephenmcgruer any idea what's going on here?
Context: consistent harness error usually indicate a problem with the test, and there aren't very many of them. It would be nice if there were none and we could add tooling to prevent them from being introduced.
The text was updated successfully, but these errors were encountered: