Closed Bug 1748869 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 32278 - Fix test harness in newly added visualViewport WPT

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

David Bokan <bokan@chromium.org> wrote:

Fix test harness in newly added visualViewport WPT

These newly added VisualViewport tests have an issue where a failed
assert will timeout rather than cause a failure in the test harness.
This makes failures on the dashboard less useful and take longer to run.

Turns out that this is due to the Promise in promise_test having an
async function (not sure what the underlying reason is, IIUC this should
work):

promise_test(function() {
return new Promise(async (resolve) => {
assert_equals(1, 0); // isn't caught by test harness so timesout
// but works if we remove async above.
});
});

Replacing the return promise with an async function makes this work and
is cleaner:

promise_test(async () => {
assert_equals(1, 0); // Failure is now caught by test harness.
});

Bug: 1016210
Change-Id: Id089518eba1795447e66f61400f577d7ac564ccb

Reviewed-on: https://chromium-review.googlesource.com/3370073
WPT-Export-Revision: 9c5f4bab966cf4d573c192e6fb2b4be594a6b6a3

PR 32278 applied with additional changes from upstream: 40a8ec17f2f2002e555af10311e53a0ee866668f
Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 2 tests and 1 subtests

Status Summary

Firefox

OK : 1
FAIL : 2
ERROR : 1

Chrome

OK : 2
PASS : 2
FAIL : 1

Safari

OK : 1
FAIL : 1
TIMEOUT: 2
NOTRUN : 1

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/visual-viewport/scroll-event-order.html: ERROR

New Tests That Don't Pass

/visual-viewport/resize-event-order.html
Popup: DOMWindow resize fired before VisualViewport.: FAIL (Chrome: PASS, Safari: TIMEOUT)
iframe: DOMWindow resize fired before VisualViewport.: FAIL (Chrome: PASS, Safari: NOTRUN)
/visual-viewport/scroll-event-order.html: ERROR (Chrome: OK, Safari: OK)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b3213cfe7c3
[wpt PR 32278] - Fix test harness in newly added visualViewport WPT, a=testonly
https://hg.mozilla.org/integration/autoland/rev/a108b7632045
[wpt PR 32278] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.