Closed Bug 1937663 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 49719 - Fix a bug in test_driver.bless()

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 49719 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/49719
Details from upstream follow.

Mason Freed <masonf@chromium.org> wrote:

Fix a bug in test_driver.bless()

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/6094526
WPT-Export-Revision: 0a4ef03f19d769b65b13fedcbac56c235bd5bbd7

PR 49719 applied with additional changes from upstream: 70e5fd98c0eed8d024c7743fb476386a36c8b8d0
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 63 subtests

Status Summary

Firefox

OK : 1
PASS : 63

Chrome

OK : 1
PASS : 64

Safari

OK : 1
PASS : 22
FAIL : 41
TIMEOUT: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/337b58e38943 [wpt PR 49719] - Fix a bug in test_driver.bless(), a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.