diff --git a/testing/web-platform/tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html b/testing/web-platform/tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html index 2922894832dc..934d74c87744 100644 --- a/testing/web-platform/tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html +++ b/testing/web-platform/tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html @@ -10,19 +10,25 @@
diff --git a/testing/web-platform/tests/content-security-policy/reporting/report-same-origin-with-cookies.html b/testing/web-platform/tests/content-security-policy/reporting/report-same-origin-with-cookies.html index 515996c1dd31..9a09722b4093 100644 --- a/testing/web-platform/tests/content-security-policy/reporting/report-same-origin-with-cookies.html +++ b/testing/web-platform/tests/content-security-policy/reporting/report-same-origin-with-cookies.html @@ -15,6 +15,10 @@ "/cookies/resources/set-cookie.py?name=cspViolationReportCookie2&path=" + encodeURIComponent("/"), {mode: 'no-cors', credentials: 'include'}) .then(() => { + test.add_cleanup(() => { + document.cookie = "cspViolationReportCookie2=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT"; + }); + // This image will generate a CSP violation report. const img = new Image(); img.onerror = test.step_func_done();