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

[COOP] Report-only navigation tests #24379

Merged
merged 1 commit into from Jul 5, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 29, 2020

This adds basic tests of the report-only features for the navigation
case, where the report-only headers would cause a browsing context
group switch.

Bug: 1099208
Change-Id: Ia5261d5d1ddac4a83943e0a48b5ef5f2cdb47b7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2266000
Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785021}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a 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.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2266000 branch 3 times, most recently from e6ec0f5 to 898bc24 Compare July 3, 2020 08:55
This adds basic tests of the report-only features for the navigation
case, where the report-only headers would cause a browsing context
group switch.

Bug: 1099208
Change-Id: Ia5261d5d1ddac4a83943e0a48b5ef5f2cdb47b7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2266000
Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785021}
@stephenmcgruer
Copy link
Contributor

chrome-dev stability failure is html/cross-origin-opener-policy/coop-navigated-history-popup.https.html, known flaky.

firefox-nightly stability failure is:

68:06.66 INFO ## Unstable results ##
68:06.66 INFO |                                                           Test                                                          |                                                                                     Subtest                                                                                     |             Results             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Messages                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
68:06.66 INFO |-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html`               |                                                                                                                                                                                 | **OK: 4/10, TIMEOUT: 6/10**     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html`               | `coop reporting test Report only tests for an opener without any COOP/COOP report only set to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", ` | **FAIL: 4/10, TIMEOUT: 6/10**   | `promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=fd6cfd89-90e4-4a97-921f-d2157f3c9706$/\",\"effective-policy\":\"same-origin\",\"navigation-uri\":\"https://web-platform.test:8443/\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=fd6cfd89-90e4-4a97-921f-d2157f3c9706$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=be7360e4-25a0-4ff2-96b8-3adeb1c1bb25$/\",\"effective-policy\":\"same-origin\",\"navigation-uri\":\"https://web-platform.test:8443/\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=be7360e4-25a0-4ff2-96b8-3adeb1c1bb25$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=ff1a2007-9f84-4d60-9aa0-9b2e0262fa2e$/\",\"effective-policy\":\"same-origin\",\"navigation-uri\":\"https://web-platform.test:8443/\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=ff1a2007-9f84-4d60-9aa0-9b2e0262fa2e$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=13e6f08c-b3b5-478e-99da-92386cd4b9e9$/\",\"effective-policy\":\"same-origin\",\"navigation-uri\":\"https://web-platform.test:8443/\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=13e6f08c-b3b5-478e-99da-92386cd4b9e9$/\",\"type\":\"coop\"}, within available reports: []";Test timed out`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html`               | `verify remaining reports`                                                                                                                                                      | **NOTRUN: 6/10, PASS: 4/10**    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html`          | `coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", `                                  | **FAIL: 1/10, TIMEOUT: 9/10**   | `promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"effective-policy\":\"same-origin\",\"navigation-uri\":\"/uuid=244442b1-e419-4b1d-b969-caad03cf4217$/\",\"violation-type\":\"navigation-from-document\"},\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []";Test timed out`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html`          | `coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", `                                   | **NOTRUN: 9/10, TIMEOUT: 1/10** | `Test timed out`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html`                    |                                                                                                                                                                                 | **OK: 4/10, TIMEOUT: 6/10**     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html`                    | `coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp`                       | **FAIL: 4/10, TIMEOUT: 6/10**   | `promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=b893ef9e-a4b2-47f7-940b-213964cb87bd$/\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=b893ef9e-a4b2-47f7-940b-213964cb87bd$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=008f7737-2803-44b6-bbc5-58d44b637217$/\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=008f7737-2803-44b6-bbc5-58d44b637217$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=4eaec92b-0488-47df-a8bd-4d6236551e93$/\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=4eaec92b-0488-47df-a8bd-4d6236551e93$/\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"document-uri\":\"/uuid=f670cb4b-69c3-4a8e-893c-07ac92a87e2a$/\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"violation-type\":\"navigation-to-document\"},\"url\":\"/uuid=f670cb4b-69c3-4a8e-893c-07ac92a87e2a$/\",\"type\":\"coop\"}, within available reports: []";Test timed out`                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html`                    | `verify remaining reports`                                                                                                                                                      | **NOTRUN: 6/10, PASS: 4/10**    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html` | `coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, , `                           | **FAIL: 4/10, TIMEOUT: 6/10**   | `promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"document-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"/uuid=c8261082-ea85-4cbb-864e-3f07bb65bc11$/\",\"violation-type\":\"navigation-from-document\"},\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"document-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"/uuid=2347f0f1-0db1-4a2e-81c0-d9383196e4d0$/\",\"violation-type\":\"navigation-from-document\"},\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"document-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"/uuid=8f68f1f5-ef99-4e85-abda-bb2fa03e2a80$/\",\"violation-type\":\"navigation-from-document\"},\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []";promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"document-uri\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"effective-policy\":\"same-origin-plus-coep\",\"navigation-uri\":\"/uuid=178b8472-7bf2-43fa-914a-2642b26ec9ba$/\",\"violation-type\":\"navigation-from-document\"},\"url\":\"https://web-platform.test:8443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []";Test timed out` |
68:06.66 INFO | `/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html` | `coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-endpoint", require-corp`                            | **NOTRUN: 6/10, TIMEOUT: 4/10** | `Test timed out`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
68:06.66 INFO 
68:06.66 INFO ::: Running tests in a loop 10 times : FAIL

One of these, html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html, was modified by this PR but is previously flaky anyway on Firefox.

The other three are new tests in this PR, so I will open a crbug to ask the authors to take a look at this flake before we merge. I wonder if there's something systematic about the COOP tests that is causing Firefox flake (could be test bug, could be Firefox bug).

@stephenmcgruer
Copy link
Contributor

I was unable to reproduce on Firefox locally for the report. As such I'm going to merge this, but noting that it may cause problems down the road :/.

@stephenmcgruer stephenmcgruer merged commit b793822 into master Jul 5, 2020
@stephenmcgruer stephenmcgruer deleted the chromium-export-cl-2266000 branch July 5, 2020 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants