Closed Bug 2080571 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63518 - [wpt] Make integrity-policy/style.https.html?reporting=true fail fast

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mike Taylor <miketaylr@chromium.org> wrote:

[wpt] Make integrity-policy/style.https.html?reporting=true fail fast

When a policy violation is expected, the ?reporting=true variant awaited
the ReportingObserver promise with no bound. Chromium only implements
Integrity-Policy for the script destination (IntegrityPolicyScript), so
for style no 'integrity-violation' report is ever dispatched and the
very first subtest hangs until the harness timeout, which is why the
variant has been [ Skip Timeout ] since it was imported.

Race the report promise against a timer in both branches (1s when a
report is expected, keeping the existing 100ms when one is not). The
style has already finished loading by this point, so a conforming
implementation still observes the report immediately, while a
non-conforming one now gets a deterministic per-subtest FAIL ("Expected a
policy violation report") in about a second instead of a timeout.

Add the Chromium baseline for ?reporting=true, which mirrors the existing
?reporting=false baseline plus the report-only case, and drop the
[ Skip Timeout ] expectation so the variant runs on the bots again.

Bug: 431034515
Change-Id: Iaa024bc977d407cee48ba5fc25c1a55f69e391a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8547072
Auto-Submit: Mike Taylor \<miketaylr@chromium.org>
Reviewed-by: Ari Chivukula \<arichiv@chromium.org>
Commit-Queue: Ari Chivukula \<arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1716020}

Component: web-platform-tests → DOM: Security
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 12 subtests

Status Summary

Firefox

OK : 2
PASS: 15
FAIL: 9

Chrome

OK : 2
PASS: 15
FAIL: 9

Safari

OK : 2
PASS: 15
FAIL: 9

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /subresource-integrity/integrity-policy/style.https.html?reporting=false [wpt.fyi]
    • Ensure that a style without integrity did not run: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that a style with unknown integrity algorithm did not run: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that a no-cors style gets blocked: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that ReportingObserver gets called without endpoints: FAIL (Chrome: FAIL, Safari: FAIL)
  • /subresource-integrity/integrity-policy/style.https.html?reporting=true [wpt.fyi]
    • Ensure that a style without integrity did not run: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that a style with unknown integrity algorithm did not run: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that a style without integrity algorithm runs and gets reported in report-only mode: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that a no-cors style gets blocked: FAIL (Chrome: FAIL, Safari: FAIL)
    • Ensure that ReportingObserver gets called without endpoints: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ad96e7ab9c6d https://hg.mozilla.org/integration/autoland/rev/603f13188b64 [wpt PR 63518] - [wpt] Make integrity-policy/style.https.html?reporting=true fail fast, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.