Automatic update from web-platform-tests
Fix a bug in test_driver.bless() (#49719)
This code was previously doing this:
let wait_click = new Promise(resolve => {
button.addEventListener("click", resolve));
};
return test_driver.click(button)
.then(wait_click)
.then(...
but the argument to `.then(wait_click)` isn't a function, it's the
promise to return. Therefore .then() creates an already-resolved
promise containing `wait_click` as its resolved value. Which the next
`.then()` block ignores. So this wasn't actually waiting for the click
to occur.
This triggered a number of test bugs (caused by erroneous assumptions
accidentally baked into the tests. I fixed a few, and filed a few
bugs for the rest (after failing to figure out how to fix them).
Note that the WPT version of testdriver.js is rolled into Chromium,
so that change is being made here:
https://github.com/web-platform-tests/wpt/pull/49691
Bug: 384009734,384050894
Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526
Reviewed-by: Jonathan Lee <jonathanjlee@google.com>
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1397010}
Co-authored-by: Mason Freed <masonf@chromium.org>
--
wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466
wpt-pr: 49719