Title: [275906] trunk/LayoutTests
- Revision
- 275906
- Author
- [email protected]
- Date
- 2021-04-13 13:37:34 -0700 (Tue, 13 Apr 2021)
Log Message
http/.../contentSecurityPolicy/report-document-uri-after-blocked-redirect.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=224498
<rdar://problem/76602331>
The error reported by the xhr may not always happen before the
document URI is reported. We should only end the test if both
the error and URI have been reported.
Reviewed by Jonathan Bedard.
* http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (275905 => 275906)
--- trunk/LayoutTests/ChangeLog 2021-04-13 20:19:18 UTC (rev 275905)
+++ trunk/LayoutTests/ChangeLog 2021-04-13 20:37:34 UTC (rev 275906)
@@ -1,3 +1,17 @@
+2021-04-13 Kate Cheney <[email protected]>
+
+ http/.../contentSecurityPolicy/report-document-uri-after-blocked-redirect.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=224498
+ <rdar://problem/76602331>
+
+ The error reported by the xhr may not always happen before the
+ document URI is reported. We should only end the test if both
+ the error and URI have been reported.
+
+ Reviewed by Jonathan Bedard.
+
+ * http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html:
+
2021-04-13 Peng Liu <[email protected]>
[macOS] Netflix videos opened in background tab never become playable after foregrounding
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html (275905 => 275906)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html 2021-04-13 20:19:18 UTC (rev 275905)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html 2021-04-13 20:37:34 UTC (rev 275906)
@@ -11,10 +11,15 @@
document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
}
+ var haveReportedXhrError = false;
+ var haveReportedDocumentURI = false;
+
// Expect the document URI to be the document URL stripped for reporting.
document.addEventListener('securitypolicyviolation', e => {
document.body.innerHTML += `documentURI = <b>${e.documentURI}</b><br/><br/>`;
- finishJSTest();
+ haveReportedDocumentURI = true;
+ if (haveReportedXhrError)
+ finishJSTest();
});
var xhr = new XMLHttpRequest;
@@ -33,6 +38,9 @@
xhr._onerror_ = function () {
testPassed("XMLHttpRequest.send() did not follow the disallowed redirect.");
+ haveReportedXhrError = true;
+ if (haveReportedDocumentURI)
+ finishJSTest();
};
xhr.send();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes