xhr.https.html (8282B)
1 <!DOCTYPE html> 2 <!-- DO NOT EDIT! Generated by `common/security-features/tools/generate.py --spec mixed-content/` --> 3 <html> 4 <head> 5 <meta charset="utf-8"> 6 <meta name="timeout" content="long"> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="/common/security-features/resources/common.sub.js"></script> 10 <script src="../../../generic/test-case.sub.js"></script> 11 </head> 12 <body> 13 <script> 14 TestCase( 15 [ 16 { 17 "expectation": "allowed", 18 "origin": "same-https", 19 "redirection": "keep-scheme", 20 "source_context_list": [ 21 { 22 "policyDeliveries": [ 23 { 24 "deliveryType": "http-rp", 25 "key": "mixedContent", 26 "value": "opt-in" 27 } 28 ], 29 "sourceContextType": "worker-module" 30 } 31 ], 32 "source_scheme": "https", 33 "subresource": "xhr", 34 "subresource_policy_deliveries": [], 35 "test_description": "Mixed-Content: Expects allowed for xhr to same-https origin and keep-scheme redirection from https context." 36 }, 37 { 38 "expectation": "allowed", 39 "origin": "same-https", 40 "redirection": "no-redirect", 41 "source_context_list": [ 42 { 43 "policyDeliveries": [ 44 { 45 "deliveryType": "http-rp", 46 "key": "mixedContent", 47 "value": "opt-in" 48 } 49 ], 50 "sourceContextType": "worker-module" 51 } 52 ], 53 "source_scheme": "https", 54 "subresource": "xhr", 55 "subresource_policy_deliveries": [], 56 "test_description": "Mixed-Content: Expects allowed for xhr to same-https origin and no-redirect redirection from https context." 57 }, 58 { 59 "expectation": "blocked", 60 "origin": "cross-http", 61 "redirection": "keep-scheme", 62 "source_context_list": [ 63 { 64 "policyDeliveries": [ 65 { 66 "deliveryType": "http-rp", 67 "key": "mixedContent", 68 "value": "opt-in" 69 } 70 ], 71 "sourceContextType": "worker-module" 72 } 73 ], 74 "source_scheme": "https", 75 "subresource": "xhr", 76 "subresource_policy_deliveries": [], 77 "test_description": "Mixed-Content: Expects blocked for xhr to cross-http origin and keep-scheme redirection from https context." 78 }, 79 { 80 "expectation": "blocked", 81 "origin": "cross-http", 82 "redirection": "no-redirect", 83 "source_context_list": [ 84 { 85 "policyDeliveries": [ 86 { 87 "deliveryType": "http-rp", 88 "key": "mixedContent", 89 "value": "opt-in" 90 } 91 ], 92 "sourceContextType": "worker-module" 93 } 94 ], 95 "source_scheme": "https", 96 "subresource": "xhr", 97 "subresource_policy_deliveries": [], 98 "test_description": "Mixed-Content: Expects blocked for xhr to cross-http origin and no-redirect redirection from https context." 99 }, 100 { 101 "expectation": "blocked", 102 "origin": "cross-http", 103 "redirection": "swap-scheme", 104 "source_context_list": [ 105 { 106 "policyDeliveries": [ 107 { 108 "deliveryType": "http-rp", 109 "key": "mixedContent", 110 "value": "opt-in" 111 } 112 ], 113 "sourceContextType": "worker-module" 114 } 115 ], 116 "source_scheme": "https", 117 "subresource": "xhr", 118 "subresource_policy_deliveries": [], 119 "test_description": "Mixed-Content: Expects blocked for xhr to cross-http origin and swap-scheme redirection from https context." 120 }, 121 { 122 "expectation": "blocked", 123 "origin": "cross-https", 124 "redirection": "swap-scheme", 125 "source_context_list": [ 126 { 127 "policyDeliveries": [ 128 { 129 "deliveryType": "http-rp", 130 "key": "mixedContent", 131 "value": "opt-in" 132 } 133 ], 134 "sourceContextType": "worker-module" 135 } 136 ], 137 "source_scheme": "https", 138 "subresource": "xhr", 139 "subresource_policy_deliveries": [], 140 "test_description": "Mixed-Content: Expects blocked for xhr to cross-https origin and swap-scheme redirection from https context." 141 }, 142 { 143 "expectation": "blocked", 144 "origin": "same-http", 145 "redirection": "keep-scheme", 146 "source_context_list": [ 147 { 148 "policyDeliveries": [ 149 { 150 "deliveryType": "http-rp", 151 "key": "mixedContent", 152 "value": "opt-in" 153 } 154 ], 155 "sourceContextType": "worker-module" 156 } 157 ], 158 "source_scheme": "https", 159 "subresource": "xhr", 160 "subresource_policy_deliveries": [], 161 "test_description": "Mixed-Content: Expects blocked for xhr to same-http origin and keep-scheme redirection from https context." 162 }, 163 { 164 "expectation": "blocked", 165 "origin": "same-http", 166 "redirection": "no-redirect", 167 "source_context_list": [ 168 { 169 "policyDeliveries": [ 170 { 171 "deliveryType": "http-rp", 172 "key": "mixedContent", 173 "value": "opt-in" 174 } 175 ], 176 "sourceContextType": "worker-module" 177 } 178 ], 179 "source_scheme": "https", 180 "subresource": "xhr", 181 "subresource_policy_deliveries": [], 182 "test_description": "Mixed-Content: Expects blocked for xhr to same-http origin and no-redirect redirection from https context." 183 }, 184 { 185 "expectation": "blocked", 186 "origin": "same-http", 187 "redirection": "swap-scheme", 188 "source_context_list": [ 189 { 190 "policyDeliveries": [ 191 { 192 "deliveryType": "http-rp", 193 "key": "mixedContent", 194 "value": "opt-in" 195 } 196 ], 197 "sourceContextType": "worker-module" 198 } 199 ], 200 "source_scheme": "https", 201 "subresource": "xhr", 202 "subresource_policy_deliveries": [], 203 "test_description": "Mixed-Content: Expects blocked for xhr to same-http origin and swap-scheme redirection from https context." 204 }, 205 { 206 "expectation": "blocked", 207 "origin": "same-https", 208 "redirection": "swap-scheme", 209 "source_context_list": [ 210 { 211 "policyDeliveries": [ 212 { 213 "deliveryType": "http-rp", 214 "key": "mixedContent", 215 "value": "opt-in" 216 } 217 ], 218 "sourceContextType": "worker-module" 219 } 220 ], 221 "source_scheme": "https", 222 "subresource": "xhr", 223 "subresource_policy_deliveries": [], 224 "test_description": "Mixed-Content: Expects blocked for xhr to same-https origin and swap-scheme redirection from https context." 225 } 226 ], 227 new SanityChecker() 228 ).start(); 229 </script> 230 <div id="log"></div> 231 </body> 232 </html>