Closed Bug 1965254 Opened 14 days ago Closed 7 days ago

[wpt-sync] Sync PR 52406 - [Sanitizer] Add parseHTML testcases, and fix DOCTYPE handling.

Categories

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

task

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(2 files)

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

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

Daniel Vogelheim <vogelheim@chromium.org> wrote:

[Sanitizer] Add parseHTML testcases, and fix DOCTYPE handling.

Add WPT testcases for parseHTML + parseHTMLUnsafe.

Fix \<!DOCTYPE> handling, as a follow-up to issue #288 / PR #285.
Previously, it was assumed Doc-Type nodes couldn't make it into
the sanitizer implementation; but with the change to parseHTML
context they can.

Spec: https://github.com/WICG/sanitizer-api/issues/288
Spec: https://github.com/WICG/sanitizer-api/pull/285
Bug: 356601280
Change-Id: Iec797b929eb3b90d5f08318bb28964d2f683acb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6523521
Reviewed-by: Yifan Luo \<lyf@chromium.org>
Commit-Queue: Daniel Vogelheim \<vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1457595}

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

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

Total 1 tests and 14 subtests

Status Summary

Firefox

OK : 1
PASS: 4[GitHub] 11[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
FAIL: 3[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] 10[GitHub]

Chrome

OK : 1
FAIL: 14

Safari

OK : 1
PASS: 4
FAIL: 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /sanitizer-api/sanitizer-parseHTML.tentative.html [wpt.fyi]
    • parseHTML testcase 0, "text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTML testcase 1, "<div>text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTML testcase 2, "<div>text": FAIL (Chrome: FAIL, Safari: FAIL)
    • parseHTML testcase 3, "<div>text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTMLUnsafe testcase 1, "<div>text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTMLUnsafe testcase 2, "<div>text": FAIL (Chrome: FAIL, Safari: FAIL)
    • parseHTMLUnsafe testcase 3, "<div>text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTML testcase 0, "<script>hello": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
    • parseHTML testcase 1, "<html onload="2+2"><body onload="3+3"><div>hello": FAIL (Chrome: FAIL, Safari: FAIL)
    • parseHTML full document testcase 0, "<!DOCTYPE html>
      text": FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] (Chrome: FAIL, Safari: FAIL)
Blocks: 1966027
Regressed by: 1966027
Blocks: 1966032
No longer regressed by: 1966027

Automatic update from web-platform-tests
[Sanitizer] Add parseHTML testcases, and fix DOCTYPE handling.

Add WPT testcases for parseHTML + parseHTMLUnsafe.

Fix <!DOCTYPE> handling, as a follow-up to issue #288 / PR #285.
Previously, it was assumed Doc-Type nodes couldn't make it into
the sanitizer implementation; but with the change to parseHTML
context they can.

Spec: https://github.com/WICG/sanitizer-api/issues/288
Spec: https://github.com/WICG/sanitizer-api/pull/285
Bug: 356601280
Change-Id: Iec797b929eb3b90d5f08318bb28964d2f683acb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6523521
Reviewed-by: Yifan Luo <lyf@chromium.org>
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1457595}

--

wpt-commits: 95a60666dc001951821439078be97c0bcb421476
wpt-pr: 52406

Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7033756c58b0 [wpt PR 52406] - [Sanitizer] Add parseHTML testcases, and fix DOCTYPE handling., https://hg.mozilla.org/integration/autoland/rev/bcba330bd6f0 [wpt PR 52406] - Update wpt metadata,
Status: NEW → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: