Commit a1eaa45f authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

[COOP] access reporting. Remove tests about reporting in enforced mode.

COOP access reporting will ship only in 'reporting-only'. Support for
the 'enforced-mode' has been dropped for now.

This patch remove all the tests related to the part dropped.

Bug: 1090273
Change-Id: If3081929f2409e33afe9891353afb5045df07662
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352809Reviewed-by: default avatarPâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798085}
parent 5982d6e3
...@@ -2352,10 +2352,7 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified ...@@ -2352,10 +2352,7 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_opener-coop.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ Failure Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ Failure Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html [ Failure Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html [ Failure Timeout ]
......
...@@ -2267,10 +2267,8 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified ...@@ -2267,10 +2267,8 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Failure Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Failure Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_opener-coop-ro.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_opener-coop-ro.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Failure Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Failure Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_opener-coop-ro.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_opener-coop-ro.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html [ Failure ]
......
...@@ -2424,9 +2424,7 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified ...@@ -2424,9 +2424,7 @@ crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/popup-with-structured-header.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop-ro.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/openee-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop-ro.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/opener-accessed_openee-coop.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Timeout ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property.https.html [ Timeout ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ Failure ]
crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html [ Failure ] crbug.com/1050754 external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html [ Failure ]
......
This is a testharness.js-based test.
FAIL Opener accesses openee (COOP+COEP). Report to openee assert_not_equals: Report not received got disallowed value "timeout"
Harness: the test ran to completion.
<title>
COOP reports are sent when the openee used COOP+COEP and then its opener
tries to access it.
</title>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>
<script src="/common/utils.js"></script>
<script src="../resources/dispatcher.js"></script>
<script src="../resources/try-access.js"></script>
<script>
const directory = "/html/cross-origin-opener-policy/reporting";
const executor_path = directory + "/resources/executor.html?pipe=";
const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
promise_test(async t => {
const report_token = token();
const openee_token = token();
const opener_token = token(); // The current test window.
const reportTo = reportToHeaders(report_token);
const openee_url = cross_origin + executor_path +
reportTo.header + reportTo.coopSameOriginHeader + coep_header +
`&uuid=${openee_token}`;
const openee = window.open(openee_url);
t.add_cleanup(() => send(openee_token, "window.close()"))
// 1. Make sure the new document to be loaded.
send(openee_token, `
send("${opener_token}", "Ready");
`);
let reply = await receive(opener_token);
assert_equals(reply, "Ready");
// 2. Try to access the openee. This shouldn't work because of COOP+COEP.
tryAccess(openee);
// 3. Check a report is sent to the openee.
let report = await receiveReport(report_token, "access-to-coop-page")
assert_not_equals(report, "timeout", "Report not received");
assert_equals(report.type, "coop");
assert_equals(report.url, openee_url.replace(/"/g, '%22'));
assert_equals(report.body["violation-type"], "access-to-coop-page");
assert_equals(report.body["disposition"], "enforce");
assert_equals(report.body["effective-policy"], "same-origin-plus-coep");
assert_equals(report.body["property"], "blur");
assert_source_location_missing(report);
// TODO(arthursonzogni): Add check for report > body > blocked-window-url
}, "Opener accesses openee (COOP+COEP). Report to openee");
</script>
This is a testharness.js-based test.
FAIL Opener (COOP+COEP) accesses openee. Report to opener assert_not_equals: Report not received got disallowed value "timeout"
Harness: the test ran to completion.
<title>
COOP reports are to the opener when the opener used COOP+COEP and then it
tries to access a cross-origin openee.
</title>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>
<script src="/common/utils.js"></script>
<script src="../resources/dispatcher.js"></script>
<script src="../resources/try-access.js"></script>
<script>
const directory = "/html/cross-origin-opener-policy/reporting";
const executor_path = directory + "/resources/executor.html?pipe=";
const same_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
promise_test(async t => {
// The test window.
const this_window_token = token();
// The "opener" window. This has COOP and a reporter.
const opener_report_token= token();
const opener_token = token();
const opener_reportTo = reportToHeaders(opener_report_token);
const opener_url = same_origin + executor_path + opener_reportTo.header +
opener_reportTo.coopSameOriginHeader + coep_header +
`&uuid=${opener_token}`;
// The "openee" window. This is cross origin with the "opener".
const openee_report_token= token();
const openee_token = token();
const openee_url = same_origin + executor_path + `&uuid=${openee_token}`;
// 1. Create the opener window.
let opener_window_proxy = window.open(opener_url);
t.add_cleanup(() => send(opener_token, "window.close()"));
// 2. The opener opens it openee.
send(opener_token, `
openee = window.open("${openee_url}");
send("${this_window_token}", "ACK 1");
`);
assert_equals("ACK 1", await receive(this_window_token));
t.add_cleanup(() => send(openee_token, "window.close()"));
// 3. Ensure the openee's document to be loaded.
send(openee_token, `
send("${this_window_token}", "ACK 2");
`);
assert_equals("ACK 2", await receive(this_window_token));
// 4. The opener tries to access its openee.
send(opener_token, `
tryAccess(openee);
`);
// 5. Check a report sent to the opener.
let report = await receiveReport(opener_report_token, "access-from-coop-page")
assert_not_equals(report, "timeout", "Report not received");
assert_equals(report.type, "coop");
assert_equals(report.url, opener_url.replace(/"/g, '%22'));
assert_equals(report.body["violation-type"], "access-from-coop-page");
assert_equals(report.body["disposition"], "enforce");
assert_equals(report.body["effective-policy"], "same-origin-plus-coep");
assert_equals(report.body["property"], "blur");
assert_source_location_found(report);
// TODO(arthursonzogni): Check the window-blocked-url.
}, "Opener (COOP+COEP) accesses openee. Report to opener");
</script>
This is a testharness.js-based test.
FAIL Openee (COOP+COEP) accesses opener. Report to openee assert_not_equals: Report not received got disallowed value "timeout"
Harness: the test ran to completion.
<title>
COOP reports are sent when the openee used COOP+COEP and then tries to
access its opener.
</title>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>
<script src="/common/utils.js"></script>
<script src="../resources/dispatcher.js"></script>
<script src="../resources/try-access.js"></script>
<script>
const directory = "/html/cross-origin-opener-policy/reporting";
const executor_path = directory + "/resources/executor.html?pipe=";
const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
promise_test(async t => {
const report_token = token();
const openee_token = token();
const reportTo = reportToHeaders(report_token);
const openee_url = cross_origin + executor_path +
reportTo.header + reportTo.coopSameOriginHeader + coep_header +
`&uuid=${openee_token}`;
const openee = window.open(openee_url);
t.add_cleanup(() => send(openee_token, "window.close()"));
// 1. Try to access the opener. A report is sent, because of COOP+COEP.
send(openee_token, `
tryAccess(opener);
`);
// 2. Check a report is sent to the openee.
let report = await receiveReport(report_token, "access-from-coop-page")
assert_not_equals(report, "timeout", "Report not received");
assert_equals(report.type, "coop");
assert_equals(report.url, openee_url.replace(/"/g, '%22'));
assert_equals(report.body["violation-type"], "access-from-coop-page");
assert_equals(report.body["disposition"], "enforce");
assert_equals(report.body["effective-policy"], "same-origin-plus-coep");
assert_equals(report.body["property"], "blur");
assert_source_location_found(report);
}, "Openee (COOP+COEP) accesses opener. Report to openee");
</script>
This is a testharness.js-based test.
FAIL Openee accesses opener (COOP-COEP). Report to opener assert_not_equals: Report not received got disallowed value "timeout"
Harness: the test ran to completion.
<title>
COOP reports are to the opener when the opener used COOP+COEP and then its
cross-origin openee tries to access it.
</title>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>
<script src="/common/utils.js"></script>
<script src="../resources/dispatcher.js"></script>
<script src="../resources/try-access.js"></script>
<script>
const directory = "/html/cross-origin-opener-policy/reporting";
const executor_path = directory + "/resources/executor.html?pipe=";
const same_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
promise_test(async t => {
// The test window.
const this_window_token = token();
// The "opener" window. This has COOP and a reporter.
const opener_report_token= token();
const opener_token = token();
const opener_reportTo = reportToHeaders(opener_report_token);
const opener_url = same_origin + executor_path + opener_reportTo.header +
opener_reportTo.coopSameOriginHeader + coep_header +
`&uuid=${opener_token}`;
// The "openee" window. This is cross origin with the "opener".
const openee_report_token= token();
const openee_token = token();
const openee_url = same_origin + executor_path + `&uuid=${openee_token}`;
// 1. Create the opener window.
let opener_window_proxy = window.open(opener_url);
t.add_cleanup(() => send(opener_token, "window.close()"));
// 2. The opener opens its openee.
send(opener_token, `
openee = window.open("${openee_url}");
send("${this_window_token}", "ACK 1");
`);
assert_equals("ACK 1", await receive(this_window_token));
t.add_cleanup(() => send(openee_token, "window.close()"));
// 3. The openee tries to access its opener.
send(openee_token, `
tryAccess(opener);
`);
// 4. Check a report is sent to the opener.
let report = await receiveReport(opener_report_token, "access-to-coop-page")
assert_not_equals(report, "timeout", "Report not received");
assert_equals(report.type, "coop");
assert_equals(report.url, opener_url.replace(/"/g, '%22'));
assert_equals(report.body["violation-type"], "access-to-coop-page");
assert_equals(report.body["disposition"], "enforce");
assert_equals(report.body["effective-policy"], "same-origin-plus-coep");
assert_equals(report.body["property"], "blur");
assert_source_location_missing(report);
// TODO(arthursonzogni): Check the window-blocked-url.
}, "Openee accesses opener (COOP-COEP). Report to opener");
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment