[wpt] Fix misattributed failures in select-events.tentative.html
This test registers several event listeners with failing assert_*
s,
with no code to handle the thrown error. This can cause testharness.js
to not link the failing assertion to any subtest 0:
a. For a promise that wraps an event listener, the error thrown by
assert_*
causes the promise to never settle. Replace them with
testharness.js's EventWatcher
1, which provides a more egonomic
API to wait for events as promises.
b. An event listener that doesn't resolve an external promise can just
be wrapped in t.step_func(...)
2.
c. Wait for "click" events concurrently with clickOn()
so that the
former can't reject unhandled.
The test still times out on the "Listbox controller code should not run"
subtest, but this now reflects a genuine browser defect.
Bug: None
Change-Id: If846ebc983ca35142b3fd22769f48ee51fa23e47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954825
Commit-Queue: Jonathan Lee jonathanjlee@google.com
Reviewed-by: Joey Arhar jarhar@chromium.org
Cr-Commit-Position: refs/heads/main@{#1372916}