Bug 1433617 - Cache control headers added to png image. r=ckerschb

--HG--
extra : amend_source : 4a30050800fc5b70e03297d8f241177787a8ffeb
This commit is contained in:
vinoth 2018-03-25 10:44:59 +02:00
Родитель 308f555006
Коммит 627b9d2350
5 изменённых файлов: 35 добавлений и 12 удалений

Просмотреть файл

@ -211534,6 +211534,11 @@
{}
]
],
"content-security-policy/support/file-prefetch-allowed.html": [
[
{}
]
],
"content-security-policy/support/fonts.css": [
[
{}
@ -414914,7 +414919,7 @@
"testharness"
],
"content-security-policy/prefetch-src/prefetch-allowed.html": [
"8c88fefbffb6f5270b64cd8d81b405857a9c1123",
"45e002cde6f0e61cfc4876fad6d5af7341fec346",
"testharness"
],
"content-security-policy/prefetch-src/prefetch-blocked.html": [
@ -415865,6 +415870,10 @@
"13c3f17f61fa30ac6d7c5c54bd73a6f93d1611c1",
"support"
],
"content-security-policy/support/file-prefetch-allowed.html": [
"13e9e4ef7ad82d1f9404381a3eeb2a00c319b52a",
"support"
],
"content-security-policy/support/fonts.css": [
"4577fb4f580bfd9c723e1a5ee0f9d8438ce41ac9",
"support"

Просмотреть файл

@ -1,5 +1,3 @@
[prefetch-allowed.html]
prefs: [security.mixed_content.upgrade_display_content:false]
[Prefetch succeeds when allowed by prefetch-src]
expected: FAIL
comment: prefetch-src is not supported via meta tag but the test is passing as the tests only tests that 'self' works

Просмотреть файл

@ -1429,7 +1429,7 @@
"support"
],
"wasm/js/globals.wast.js": [
"86b3c907edd8bb3867c5a5aaaebf6066a215b154",
"1cb0dc48bd61564325053bf49ae7a1bdb27f5c49",
"support"
],
"wasm/js/harness/index.js": [

Просмотреть файл

@ -1,20 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="prefetch-src 'self'">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/content-security-policy/support/testharness-helper.js'></script>
<script src='/content-security-policy/support/prefetch-helper.js'></script>
<script>
async_test(t => {
let url = window.origin + '/content-security-policy/support/pass.png';
var win = window.open('/content-security-policy/support/' +
'file-prefetch-allowed.html');
win.addEventListener('load', function () {
// Cache control headers are added,since they are needed
// to enable prefetching.
let url = '/content-security-policy/support/pass.png' +
'?pipe=header(Cache-Control, max-age=604800)';
let link = document.createElement('link');
link.rel = 'prefetch';
link.href = url;
assert_link_prefetches(t, link);
// Link element is created on the new opened window.
let link = win.document.createElement('link');
link.rel = 'prefetch';
link.href = url;
assert_link_prefetches(t, link);
win.close();
}, false);
}, 'Prefetch succeeds when allowed by prefetch-src');
</script>
</head>

Просмотреть файл

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<!-- CSP directive 'prefetch-src' is not supported via meta tag though -->
<meta http-equiv="Content-Security-Policy" content="prefetch-src 'self'">
</head>
<body>
</body>
</html>