| Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html
|
| index dfb4fd195927755e1223bc54c429d74260b39f22..299383c4690ba4a236f443f2b7d8e545b1fa2940 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri_iframe_sandbox.sub.html
|
| @@ -2,12 +2,11 @@
|
| <html>
|
|
|
| <head>
|
| - <meta charset="utf-8">
|
| + <meta http-equiv="Content-Security-Policy" content="base-uri {{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}/base/">
|
| +
|
| <title>base-uri works correctly inside a sandboxed iframe.</title>
|
| <script src='/resources/testharness.js'></script>
|
| <script src='/resources/testharnessreport.js'></script>
|
| -
|
| - <!-- CSP served: base-uri 'self' -->
|
| </head>
|
|
|
| <body>
|
| @@ -16,7 +15,7 @@
|
|
|
| <script>
|
| window.addEventListener('securitypolicyviolation', function(e) {
|
| - assert_unreached('No CSP violation report has fired.');
|
| + assert_unreached('No CSP violation report should have been fired.');
|
| });
|
|
|
| async_test(function(t) {
|
| @@ -24,21 +23,21 @@
|
| i.sandbox = 'allow-scripts';
|
| i.style.display = 'none';
|
| i.srcdoc = `
|
| - <script>
|
| - window.addEventListener('securitypolicyviolation', function() {
|
| - top.postMessage('FAIL', '*');
|
| - });
|
| - </sc` + `ript>
|
| - <base href="{{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}/base/">
|
| - <script>
|
| - top.postMessage(document.baseURI, '*');
|
| - </sc` + `ript>`;
|
| + <script>
|
| + window.addEventListener('securitypolicyviolation', function() {
|
| + top.postMessage('FAIL', '*');
|
| + });
|
| + </sc` + `ript>
|
| + <base href="{{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}/base/">
|
| + <script>
|
| + top.postMessage(document.baseURI, '*');
|
| + </sc` + `ript>`;
|
|
|
| window.addEventListener('message', t.step_func(function(e) {
|
| - if (e.source === i.contentWindow) {
|
| - assert_equals(e.data, location.origin + '/base/');
|
| - t.done();
|
| - }
|
| + if (e.source === i.contentWindow) {
|
| + assert_equals(e.data, location.origin + '/base/');
|
| + t.done();
|
| + }
|
| }));
|
|
|
| document.body.appendChild(i);
|
|
|