зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631938 - Fix host substitution in CSP test, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D72213
This commit is contained in:
Родитель
c1b4ec0073
Коммит
5bf8846dd2
|
@ -1,5 +0,0 @@
|
|||
[frame-src-same-document-meta.html]
|
||||
expected: TIMEOUT
|
||||
[Same-document navigations in an iframe blocked by CSP frame-src dynamically using the <meta> tag]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
{
|
||||
iframe.name = "theiframe";
|
||||
iframe.src =
|
||||
"http://www1.{{host}}/content-security-policy/support/frame.html#0";
|
||||
let iframeLoaded = new Promise(resolve => { iframe.onload = resolve; });
|
||||
"http://www1.{{host}}:{{ports[http][0]}}/content-security-policy/frame-src/support/frame.html?0";
|
||||
let iframeLoaded = new Promise(resolve => { iframe.onload = resolve });
|
||||
document.body.appendChild(iframe);
|
||||
await iframeLoaded;
|
||||
}
|
||||
|
@ -26,10 +26,10 @@
|
|||
// 3. Blocked same-document navigation using iframe.src.
|
||||
{
|
||||
let violation = new Promise(resolve => {
|
||||
window.addEventListener('securitypolicyviolation', resolve);
|
||||
window.addEventListener('securitypolicyviolation', () => resolve());
|
||||
});
|
||||
iframe.src =
|
||||
"http://www1.{{host}}/content-security-policy/support/frame.html#1";
|
||||
"http://www1.{{host}}:{{ports[http][0]}}/content-security-policy/frame-src/support/frame.html?1";
|
||||
await violation;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
window.addEventListener('securitypolicyviolation', resolve);
|
||||
});
|
||||
window.open(
|
||||
"http://www1.{{host}}/content-security-policy/support/frame.html#2",
|
||||
"http://www1.{{host}}:{{ports[http][0]}}/content-security-policy/frame-src/support/frame.html?2",
|
||||
"theiframe");
|
||||
await violation;
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<body></body>
|
||||
<script>
|
||||
let crossOriginUrl =
|
||||
"http://www1.{{host}}/content-security-policy/support/frame.html";
|
||||
"http://www1.{{host}}:{{ports[http][0]}}/content-security-policy/support/frame.html";
|
||||
|
||||
async_test(async test => {
|
||||
test.done();
|
Загрузка…
Ссылка в новой задаче