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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html

Issue 2694013005: Cleanup blink-side PlzNavigate logic (Closed)
Patch Set: Rebase Created 3 years, 9 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/embeddedEnforcement/embedding_csp-header.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html
index 45c36207266bdba3422bd4f0942d244fde3d7ea2..a6698864c05f5b95b47d264a40702462ce88e659 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html
@@ -49,13 +49,15 @@
i.src = src;
document.body.appendChild(i);
- i.contentWindow.location = new_src + "?csp=" + i.csp;
- window.addEventListener('message', t.step_func(e => {
- if (e.source != i.contentWindow || new_src != e.data['src'])
- return;
- assert_equals("script-src 'unsafe-inline'", e.data['embedding_csp']);
- t.done();
- }));
+ i.onload = function() {
+ i.contentWindow.location = new_src + "?csp=" + i.csp;
+ window.addEventListener('message', t.step_func(e => {
+ if (e.source != i.contentWindow || new_src != e.data['src'])
+ return;
+ assert_equals("script-src 'unsafe-inline'", e.data['embedding_csp']);
+ t.done();
+ }));
+ }
}, "Set Embedding-CSP Header on change of window's location.");
async_test(t => {
@@ -112,4 +114,4 @@
}, "Set Embedding-CSP Header on change of csp attribte and redirect.");
</script>
</body>
-</html>
+</html>

Powered by Google App Engine
This is Rietveld 408576698