Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js

Issue 2431353002: Fixing allow_csp_from.html test and enabling it back in sit-per-process (Closed)
Patch Set: Style Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js
index 77f8228d9027d4364fa537468ec1592648fbc95c..87d131252e0a7ebadb360743bdfd066994059f4b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/child-csp-test.js
@@ -21,7 +21,11 @@ function injectIframeWithCSP(url, shouldBlock, csp, t, urlId) {
});
if (shouldBlock) {
- window.onmessage = t.unreached_func('No message should be sent from the frame.');
+ window.onmessage = function (e) {
+ if (e.source != i.contentWindow)
+ return;
+ t.unreached_func('No message should be sent from the frame.');
+ }
i.onload = t.step_func(function () {
// Delay the check until after the postMessage has a chance to execute.
setTimeout(t.step_func_done(function () {

Powered by Google App Engine
This is Rietveld 408576698