| 1 |
<!DOCTYPE html> |
| 2 |
<!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec content-security-policy/` --> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<meta name="timeout" content="long"> |
| 7 |
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'"> |
| 8 |
<script src="/resources/testharness.js"></script> |
| 9 |
<script src="/resources/testharnessreport.js"></script> |
| 10 |
<script src="/common/security-features/resources/common.sub.js"></script> |
| 11 |
<script src="../../../generic/test-case.sub.js"></script> |
| 12 |
</head> |
| 13 |
<body> |
| 14 |
<script> |
| 15 |
TestCase( |
| 16 |
[ |
| 17 |
{ |
| 18 |
"expectation": "allowed", |
| 19 |
"origin": "same-http", |
| 20 |
"redirection": "keep-origin", |
| 21 |
"source_context_list": [], |
| 22 |
"source_scheme": "http", |
| 23 |
"subresource": "sharedworker-import", |
| 24 |
"subresource_policy_deliveries": [ |
| 25 |
{ |
| 26 |
"deliveryType": "meta", |
| 27 |
"key": "contentSecurityPolicy", |
| 28 |
"value": 'script-src-self' |
| 29 |
} |
| 30 |
], |
| 31 |
"test_description": "Content Security Policy: Expects allowed for sharedworker-import to same-http origin and keep-origin redirection from http context." |
| 32 |
}, |
| 33 |
{ |
| 34 |
"expectation": "allowed", |
| 35 |
"origin": "same-http", |
| 36 |
"redirection": "no-redirect", |
| 37 |
"source_context_list": [], |
| 38 |
"source_scheme": "http", |
| 39 |
"subresource": "sharedworker-import", |
| 40 |
"subresource_policy_deliveries": [ |
| 41 |
{ |
| 42 |
"deliveryType": "meta", |
| 43 |
"key": "contentSecurityPolicy", |
| 44 |
"value": 'script-src-self' |
| 45 |
} |
| 46 |
], |
| 47 |
"test_description": "Content Security Policy: Expects allowed for sharedworker-import to same-http origin and no-redirect redirection from http context." |
| 48 |
}, |
| 49 |
{ |
| 50 |
"expectation": "blocked", |
| 51 |
"origin": "cross-http", |
| 52 |
"redirection": "keep-origin", |
| 53 |
"source_context_list": [], |
| 54 |
"source_scheme": "http", |
| 55 |
"subresource": "sharedworker-import", |
| 56 |
"subresource_policy_deliveries": [ |
| 57 |
{ |
| 58 |
"deliveryType": "meta", |
| 59 |
"key": "contentSecurityPolicy", |
| 60 |
"value": 'script-src-self' |
| 61 |
} |
| 62 |
], |
| 63 |
"test_description": "Content Security Policy: Expects blocked for sharedworker-import to cross-http origin and keep-origin redirection from http context." |
| 64 |
}, |
| 65 |
{ |
| 66 |
"expectation": "blocked", |
| 67 |
"origin": "cross-http", |
| 68 |
"redirection": "no-redirect", |
| 69 |
"source_context_list": [], |
| 70 |
"source_scheme": "http", |
| 71 |
"subresource": "sharedworker-import", |
| 72 |
"subresource_policy_deliveries": [ |
| 73 |
{ |
| 74 |
"deliveryType": "meta", |
| 75 |
"key": "contentSecurityPolicy", |
| 76 |
"value": 'script-src-self' |
| 77 |
} |
| 78 |
], |
| 79 |
"test_description": "Content Security Policy: Expects blocked for sharedworker-import to cross-http origin and no-redirect redirection from http context." |
| 80 |
}, |
| 81 |
{ |
| 82 |
"expectation": "blocked", |
| 83 |
"origin": "cross-http", |
| 84 |
"redirection": "swap-origin", |
| 85 |
"source_context_list": [], |
| 86 |
"source_scheme": "http", |
| 87 |
"subresource": "sharedworker-import", |
| 88 |
"subresource_policy_deliveries": [ |
| 89 |
{ |
| 90 |
"deliveryType": "meta", |
| 91 |
"key": "contentSecurityPolicy", |
| 92 |
"value": 'script-src-self' |
| 93 |
} |
| 94 |
], |
| 95 |
"test_description": "Content Security Policy: Expects blocked for sharedworker-import to cross-http origin and swap-origin redirection from http context." |
| 96 |
}, |
| 97 |
{ |
| 98 |
"expectation": "blocked", |
| 99 |
"origin": "same-http", |
| 100 |
"redirection": "swap-origin", |
| 101 |
"source_context_list": [], |
| 102 |
"source_scheme": "http", |
| 103 |
"subresource": "sharedworker-import", |
| 104 |
"subresource_policy_deliveries": [ |
| 105 |
{ |
| 106 |
"deliveryType": "meta", |
| 107 |
"key": "contentSecurityPolicy", |
| 108 |
"value": 'script-src-self' |
| 109 |
} |
| 110 |
], |
| 111 |
"test_description": "Content Security Policy: Expects blocked for sharedworker-import to same-http origin and swap-origin redirection from http context." |
| 112 |
} |
| 113 |
], |
| 114 |
new SanityChecker() |
| 115 |
).start(); |
| 116 |
</script> |
| 117 |
<div id="log"></div> |
| 118 |
</body> |
| 119 |
</html> |