Skip to content
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

Add more tests for CSP violations of require-trusted-types-for directive. #50905

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Add more tests for CSP violations of require-trusted-types-for direct…

89897f1
Select commit
Loading
Failed to load commit list.
Open

Add more tests for CSP violations of require-trusted-types-for directive. #50905

Add more tests for CSP violations of require-trusted-types-for direct…
89897f1
Select commit
Loading
Failed to load commit list.
Community-TC Integration / wpt-chrome-dev-stability succeeded Feb 25, 2025 in 5m 28s

Community-TC (pull_request)

Verify that all tests affected by a pull request are stable when executed in chrome.

Details

View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster

Task Status

Started: 2025-02-25T07:33:04.332Z
Resolved: 2025-02-25T07:37:34.802Z
Task Execution Time: 4 minutes, 30 seconds, 470 milliseconds
Task Status: completed
Reason Resolved: completed
RunId: 0

Artifacts

- public/logs/live_backing.log
- public/logs/live.log
- public/results/checkrun.md

WPT Command: python3 ./wpt run --channel=dev --verify --verify-no-chaos-mode --verify-repeat-loop=0 --verify-repeat-restart=10 --github-checks-text-file=/home/test/artifacts/checkrun.md --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --enable-swiftshader --install-browser --install-webdriver chrome


[taskcluster 2025-02-25 07:33:04.425Z] Task ID: JaA-JmrXS_yNjTT1UlAGww
[taskcluster 2025-02-25 07:33:04.425Z] Worker ID: 7723080113097592044
[taskcluster 2025-02-25 07:33:04.425Z] Worker Group: us-east4-c
[taskcluster 2025-02-25 07:33:04.425Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2025-02-25 07:33:04.425Z] Worker Pool: proj-wpt/ci
[taskcluster 2025-02-25 07:33:04.425Z] Worker Version: 46.1.0
[taskcluster 2025-02-25 07:33:04.425Z] Public IP: 35.245.10.229
[taskcluster 2025-02-25 07:33:04.425Z] Hostname: proj-wpt-ci-qgkjpuhpt1auxntdq8pwka

560c024910be - Started downloading
ff2b96c8f8ff - Started downloading
ff2b96c8f8ff - Downloaded in 0.002 seconds
72ebe8ecf66d - Started downloading
430011f338a2 - Started downloading
430011f338a2 - Downloaded in 0.009 seconds
560c024910be - Downloaded in 0.196 seconds
4f4fb700ef54 - Started downloading
4f4fb700ef54 - Downloaded in 0.002 seconds
79df10d18997 - Started downloading
7e274023cae9 - Started downloading

...(18036 lines hidden)...

 2:00.93 INFO | `Trusted Type violation report: default policy runs in report-only mode.` | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-eval-reporting.html ###
 2:00.93 INFO |                            Subtest                            | Results | Messages |
 2:00.93 INFO |---------------------------------------------------------------|---------|----------|
 2:00.93 INFO |                                                               | OK      |          |
 2:00.93 INFO | `Trusted Type violation report: evaluating a string.`         | PASS    |          |
 2:00.93 INFO | `Trusted Type violation report: evaluating a Trusted Script.` | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-report-only.html ###
 2:00.93 INFO |                                Subtest                                | Results |                Messages                |
 2:00.93 INFO |-----------------------------------------------------------------------|---------|----------------------------------------|
 2:00.93 INFO |                                                                       | OK      |                                        |
 2:00.93 INFO | `Trusted Type violation report-only: assign string to script url`     | FAIL    | `assert_true: expected true got false` |
 2:00.93 INFO | `Trusted Type violation report-only: assign string to html`           | PASS    |                                        |
 2:00.93 INFO | `Trusted Type violation report-only: assign string to script.src`     | PASS    |                                        |
 2:00.93 INFO | `Trusted Type violation report-only: assign string to script content` | PASS    |                                        |
 2:00.93 INFO | `Trusted Type violation report: check report contents`                | PASS    |                                        |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-DOMParser-parseFromString.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Document-execCommand.html ###
 2:00.93 INFO |                          Subtest                          | Results | Messages |
 2:00.93 INFO |-----------------------------------------------------------|---------|----------|
 2:00.93 INFO |                                                           | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.`                  | PASS    |          |
 2:00.93 INFO | `No violation reported (paste command).`                  | PASS    |          |
 2:00.93 INFO | `Violation report for plain string (insertHTML command).` | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Document-parseHTMLUnsafe.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Document-write.html ###
 2:00.93 INFO |                                          Subtest                                           | Results |                           Messages                          |
 2:00.93 INFO |--------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------|
 2:00.93 INFO |                                                                                            | OK      |                                                             |
 2:00.93 INFO | `No violation reported for write() with TrustedHTML arguments.`                            | FAIL    | `assert_equals: no violation reported expected 0 but got 1` |
 2:00.93 INFO | `Violation report for plain string for write() with at least one plain string argument.`   | PASS    |                                                             |
 2:00.93 INFO | `No violation reported for writeln() with TrustedHTML arguments.`                          | FAIL    | `assert_equals: no violation reported expected 0 but got 1` |
 2:00.93 INFO | `Violation report for plain string for writeln() with at least one plain string argument.` | PASS    |                                                             |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Element-innerHTML.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Element-insertAdjacentHTML.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Element-outerHTML.html ###
 2:00.93 INFO |                 Subtest                  | Results |                                                                                        Messages                                                                                       |
 2:00.93 INFO |------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 2:00.93 INFO |                                          | OK      |                                                                                                                                                                                       |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | FAIL    | `assert_equals: no exception thrown expected null but got object "NoModificationAllowedError: Failed to set the 'outerHTML' property on 'Element': This element has no parent node."` |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |                                                                                                                                                                                       |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Element-setAttribute.html ###
 2:00.93 INFO |                                                  Subtest                                                   | Results |                                                                                  Messages                                                                                 |
 2:00.93 INFO |------------------------------------------------------------------------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 2:00.93 INFO |                                                                                                            | OK      |                                                                                                                                                                           |
 2:00.93 INFO | `No violation reported for trusted types.`                                                                 | PASS    |                                                                                                                                                                           |
 2:00.93 INFO | `Violation report for HTMLIFrameElement.setAttribute('srcdoc', plain_string)`                              | FAIL    | `assert_equals: expected "HTMLIFrameElement srcdoc\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttribute\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`   |
 2:00.93 INFO | `Violation report for HTMLIFrameElement.setAttributeNS(null, 'srcdoc', plain_string)`                      | FAIL    | `assert_equals: expected "HTMLIFrameElement srcdoc\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttributeNS\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"` |
 2:00.93 INFO | `Violation report for Element.setAttribute('onclick', plain_string)`                                       | FAIL    | `assert_equals: expected "Element onclick\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttribute\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`            |
 2:00.93 INFO | `Violation report for Element.setAttributeNS(null, 'onclick', plain_string)`                               | FAIL    | `assert_equals: expected "Element onclick\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttributeNS\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`          |
 2:00.93 INFO | `Violation report for HTMLScriptElement.setAttribute('src', plain_string)`                                 | FAIL    | `assert_equals: expected "HTMLScriptElement src\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttribute\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`      |
 2:00.93 INFO | `Violation report for HTMLScriptElement.setAttributeNS(null, 'src', plain_string)`                         | FAIL    | `assert_equals: expected "HTMLScriptElement src\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttributeNS\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`    |
 2:00.93 INFO | `Violation report for SVGScriptElement.setAttribute('href', plain_string)`                                 | FAIL    | `assert_equals: expected "SVGScriptElement href\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttribute\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`      |
 2:00.93 INFO | `Violation report for SVGScriptElement.setAttributeNS(null, 'href', plain_string)`                         | FAIL    | `assert_equals: expected "SVGScriptElement href\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttributeNS\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`    |
 2:00.93 INFO | `Violation report for SVGScriptElement.setAttributeNS(http://www.w3.org/1999/xlink, 'href', plain_string)` | FAIL    | `assert_equals: expected "SVGScriptElement href\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" but got "Element setAttributeNS\|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"`    |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Element-setHTMLUnsafe.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-HTMLIFrameElement-srcdoc.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-HTMLScriptElement-innerHTML.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-HTMLScriptElement.html ###
 2:00.93 INFO |                         Subtest                          | Results | Messages |
 2:00.93 INFO |----------------------------------------------------------|---------|----------|
 2:00.93 INFO |                                                          | OK      |          |
 2:00.93 INFO | `No violation reported for trusted input (innerText).`   | PASS    |          |
 2:00.93 INFO | `Violation report for plain string (innerText)`          | PASS    |          |
 2:00.93 INFO | `No violation reported for trusted input (textContent).` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string (textContent)`        | PASS    |          |
 2:00.93 INFO | `No violation reported for trusted input (src).`         | PASS    |          |
 2:00.93 INFO | `Violation report for plain string (src)`                | PASS    |          |
 2:00.93 INFO | `No violation reported for trusted input (text).`        | PASS    |          |
 2:00.93 INFO | `Violation report for plain string (text)`               | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-Range-createContextualFragment.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.93 INFO |------------------------------------------|---------|----------|
 2:00.93 INFO |                                          | OK      |          |
 2:00.93 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.93 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.93 INFO 
 2:00.93 INFO ### /trusted-types/trusted-types-reporting-for-SVGScriptElement-innerHTML.html ###
 2:00.93 INFO |                 Subtest                  | Results | Messages |
 2:00.94 INFO |------------------------------------------|---------|----------|
 2:00.94 INFO |                                          | OK      |          |
 2:00.94 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.94 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.94 INFO 
 2:00.94 INFO ### /trusted-types/trusted-types-reporting-for-ShadowRoot-innerHTML.html ###
 2:00.94 INFO |                 Subtest                  | Results | Messages |
 2:00.94 INFO |------------------------------------------|---------|----------|
 2:00.94 INFO |                                          | OK      |          |
 2:00.94 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.94 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.94 INFO 
 2:00.94 INFO ### /trusted-types/trusted-types-reporting-for-ShadowRoot-setHTMLUnsafe.html ###
 2:00.94 INFO |                 Subtest                  | Results | Messages |
 2:00.94 INFO |------------------------------------------|---------|----------|
 2:00.94 INFO |                                          | OK      |          |
 2:00.94 INFO | `No violation reported for TrustedHTML.` | PASS    |          |
 2:00.94 INFO | `Violation report for plain string.`     | PASS    |          |
 2:00.94 INFO 
 2:00.94 INFO ### /trusted-types/trusted-types-reporting.html ###
 2:00.94 INFO |                                           Subtest                                            | Results |                                                     Messages                                                    |
 2:00.94 INFO |----------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------|
 2:00.94 INFO |                                                                                              | OK      |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: creating a forbidden policy.`                                | PASS    |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: creating a report-only-forbidden policy.`                    | PASS    |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: creating a forbidden-but-not-reported policy.`               | PASS    |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: sample for SVGScriptElement href assignment`                 | FAIL    | `assert_equals: expected "SVGScriptElement href\|about:blank" but got "SVGAnimatedString baseVal\|about:blank"` |
 2:00.94 INFO | `Trusted Type violation report: sample for SVGScriptElement href assignment by setAttribute` | FAIL    | `assert_equals: expected "SVGScriptElement href\|about:blank" but got "Element setAttribute\|about:blank"`      |
 2:00.94 INFO | `Trusted Type violation report: sample for eval`                                             | PASS    |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: sample for custom element assignment`                        | PASS    |                                                                                                                 |
 2:00.94 INFO | `Trusted Type violation report: Worker constructor`                                          | PASS    |                                                                                                                 |
 2:00.94 INFO 
 2:00.94 INFO ### /trusted-types/trusted-types-source-file-path.html ###
 2:00.94 INFO |        Subtest         | Results | Messages |
 2:00.94 INFO |------------------------|---------|----------|
 2:00.94 INFO |                        | OK      |          |
 2:00.94 INFO | `same-document script` | PASS    |          |
 2:00.94 INFO | `same-origin script`   | PASS    |          |
 2:00.94 INFO | `cross-origin script`  | PASS    |          |
 2:00.94 INFO 
 2:00.94 INFO ### /trusted-types/trusted-types-svg-script-set-href.html ###
 2:00.94 INFO |                                          Subtest                                          | Results |                                                       Messages                                                       |
 2:00.94 INFO |-------------------------------------------------------------------------------------------|---------|----------------------------------------------------------------------------------------------------------------------|
 2:00.94 INFO |                                                                                           | OK      |                                                                                                                      |
 2:00.94 INFO | `Assign string to SVGScriptElement.href.baseVal.`                                         | FAIL    | `assert_equals: expected "SVGScriptElement href\|about:blank" but got "SVGAnimatedString baseVal\|about:blank"`      |
 2:00.94 INFO | `Assign TrustedScriptURL to SVGScriptElement.href.baseVal.`                               | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to non-attached SVGScriptElement.href via setAttribute.`                   | FAIL    | `assert_equals: expected "SVGScriptElement href\|about:blank" but got "Element setAttribute\|about:blank"`           |
 2:00.94 INFO | `Assign TrustedScriptURL to non-attached SVGScriptElement.href via setAttribute.`         | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to attached SVGScriptElement.href via setAttribute.`                       | FAIL    | `assert_equals: expected "SVGScriptElement href\|about:blank" but got "Element setAttribute\|about:blank"`           |
 2:00.94 INFO | `Assign TrustedScriptURL to attached SVGScriptElement.href via setAttribute.`             | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to SVGScriptElement.className.baseVal.`                                    | FAIL    | `Failed to set the 'baseVal' property on 'SVGAnimatedString': This document requires 'TrustedScriptURL' assignment.` |
 2:00.94 INFO | `Assign TrustedScriptURL to SVGScriptElement.className.baseVal.`                          | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to SVGUseElement.href.baseVal.`                                            | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign TrustedScriptURL to SVGUseElement.href.baseVal.`                                  | PASS    |                                                                                                                      |
 2:00.94 INFO | `Setup default policy`                                                                    | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to SVGScriptElement.href.baseVal  w/ default policy.`                      | FAIL    | `assert_equals: expected "SVGScriptElement href" but got "SVGAnimatedString baseVal"`                                |
 2:00.94 INFO | `Assign string to non-attached SVGScriptElement.href via setAttribute w/ default policy.` | FAIL    | `assert_equals: expected "SVGScriptElement href" but got "Element setAttribute"`                                     |
 2:00.94 INFO | `Assign string to attached SVGScriptElement.href via setAttribute w/ default policy.`     | FAIL    | `assert_equals: expected "SVGScriptElement href" but got "Element setAttribute"`                                     |
 2:00.94 INFO | `Assign string to SVGScriptElement.className.baseVal w/ default policy.`                  | FAIL    | `assert_equals: expected "SVGScriptElement href" but got "SVGAnimatedString baseVal"`                                |
 2:00.94 INFO | `Assign TrustedScriptURL to SVGScriptElement.className.baseVal w/ default policy.`        | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign string to SVGUseElement.href.baseVal w/ default policy.`                          | PASS    |                                                                                                                      |
 2:00.94 INFO | `Assign TrustedScriptURL to SVGUseElement.href.baseVal w/ default policy.`                | PASS    |                                                                                                                      |
 2:00.94 INFO 
 2:00.94 INFO ::: Running tests in a loop with restarts 10 times : PASS
 2:00.94 INFO :::
 2:00.94 INFO ::: Test verification PASS
 2:00.94 INFO :::
X connection to :99.0 broken (explicit kill or server shutdown).

[taskcluster 2025-02-25 07:37:33.533Z] === Task Finished ===
[taskcluster 2025-02-25 07:37:34.076Z] Successful task run with exit code: 0 completed in 269.654 seconds