| 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>
|
|
|