-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Sanitizer] Add tests for safe + unsafe cases. #49761
Conversation
This tests for differences between setHTML and setHTMLUnsafe. Since the html5lib testcase format only supports one result per testcase, we use two testcase files with identical inputs, one each with the expectations for safe and unsafe variants. Also, a drive-by fix for an issue uncovered by the tests: The spec demands we block insertion in a <script> element (in safe cases). Bug: 356601280 Change-Id: I1fb19f60fdcd7262292a983b548baebcaf43a440 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039899 Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Yifan Luo <lyf@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1397856}
c8c96aa
to
9829cbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review process for this patch is being conducted in the Chromium project.
WPT Command: Some affected tests had inconsistent (flaky) results: Unstable results
These may be pre-existing or new flakes. Please try to reproduce (see the above WPT command, though some flags may not be needed when running locally) and determine if your change introduced the flake. If you are unable to reproduce the problem, please tag |
created crbug.com/385785711 |
This tests for differences between setHTML and setHTMLUnsafe. Since the html5lib testcase format only supports one result per testcase, we use two testcase files with identical inputs, one each with the expectations for safe and unsafe variants. Also, a drive-by fix for an issue uncovered by the tests: The spec demands we block insertion in a <script> element (in safe cases). Bug: 356601280 Change-Id: I1fb19f60fdcd7262292a983b548baebcaf43a440 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039899 Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Yifan Luo <lyf@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1397856} Co-authored-by: Daniel Vogelheim <vogelheim@chromium.org>
This tests for differences between setHTML and setHTMLUnsafe.
Since the html5lib testcase format only supports one result per testcase, we use two testcase files with identical inputs,
one each with the expectations for safe and unsafe variants.
Also, a drive-by fix for an issue uncovered by the tests: The
spec demands we block insertion in a <script> element (in safe cases).
Bug: 356601280
Change-Id: I1fb19f60fdcd7262292a983b548baebcaf43a440
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039899
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Yifan Luo <lyf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397856}