Closed Bug 1856126 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42137 - LoAF: ensure scripts are added after microtask checkpoint

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox120 fixed)

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Noam Rosenthal <nrosenthal@chromium.org> wrote:

LoAF: ensure scripts are added after microtask checkpoint

In most cases this already works, but there are some edge cases
where the microtask queue can be cleared after the script probe
is executed, for example in TrustedTypes.

To rectify, when adding a script, we first wait unti microtasks are
flushed if they aren't already.

Added a test that reproduces it via trusted-types.

Bug: 1485516
Change-Id: I5bb017ffc441471de65aef7c34ad1dcef159157c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4887255
Reviewed-by: Yoav Weiss \<yoavweiss@chromium.org>
Commit-Queue: Noam Rosenthal \<nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1202659}

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

ERROR : 1

Chrome

TIMEOUT: 2

Safari

ERROR : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/375329b97d12 [wpt PR 42137] - LoAF: ensure scripts are added after microtask checkpoint, a=testonly https://hg.mozilla.org/integration/autoland/rev/fa409e227b5a [wpt PR 42137] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.