Bug 1270219. Fix the meta-csp mixed-content web platform tests to actually output the <meta> tag with the content policy, so they're testing something useful. r=jgraham

This commit is contained in:
Boris Zbarsky 2016-05-04 20:41:32 -04:00
parent 7241dcd4f1
commit b7c851c9c2
51 changed files with 45 additions and 69 deletions

View File

@ -1,5 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: cross-origin-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: audio-tag\n expectation: blocked]
expected: FAIL

View File

@ -1,5 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: cross-origin-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: img-tag\n expectation: blocked]
expected: FAIL

View File

@ -1,23 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: cross-origin-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: video-tag\n expectation: blocked]
expected:
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "mac") and (version == "OS X 10.10.2") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "mac") and (version == "OS X 10.10.2") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86") and (bits == 32): FAIL
if not debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86") and (bits == 32): FAIL
if debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
if debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL

View File

@ -1,5 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: same-host-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: audio-tag\n expectation: blocked]
expected: FAIL

View File

@ -1,5 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: same-host-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: img-tag\n expectation: blocked]
expected: FAIL

View File

@ -1,23 +0,0 @@
[opt-in-blocks.https.html]
type: testharness
[opt_in_method: meta-csp\n origin: same-host-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: video-tag\n expectation: blocked]
expected:
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
if debug and (os == "mac") and (version == "OS X 10.10.2") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "mac") and (version == "OS X 10.10.2") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86") and (bits == 32): FAIL
if not debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86") and (bits == 32): FAIL
if debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
if debug and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: audio-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: fetch-request
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: form-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: iframe-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: img-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-css-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-prefetch-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: object-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: picture-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: script-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: video-tag
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: worker-request
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: xhr-request
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: websocket-request
expectation: allowed">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: fetch-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: form-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: iframe-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-css-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: object-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: picture-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: script-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: worker-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: xhr-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: websocket-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: fetch-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: form-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: iframe-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-css-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: object-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: picture-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: script-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: worker-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: xhr-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: websocket-request
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -7,7 +7,7 @@
<meta name="description" content="%(spec_description)s">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="%(spec_specification_url)s">
<meta name="assert" content="%(test_description)s">
<meta name="assert" content="%(test_description)s">%(meta_opt_in)s
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -89,7 +89,7 @@ def generate_selection(selection, spec, test_html_template_basename):
opt_in_method = selection['opt_in_method']
selection['meta_opt_in'] = ''
if opt_in_method == 'meta-csp':
selection['meta_opt_in'] = '<meta http-equiv="Content-Security-Policy" ' + \
selection['meta_opt_in'] = '\n <meta http-equiv="Content-Security-Policy" ' + \
'content="block-all-mixed-content">'
elif opt_in_method == 'http-csp':
opt_in_headers = "Content-Security-Policy: block-all-mixed-content\n"

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: audio-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: img-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-prefetch-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: video-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: audio-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: img-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: link-prefetch-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -14,6 +14,7 @@
redirection: no-redirect
subresource: video-tag
expectation: blocked">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mixed-content/generic/common.js"></script>

View File

@ -1 +1 @@
var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "subresource": {"blockable": ["iframe-tag", "script-tag", "link-css-tag", "form-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag", "link-prefetch-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "TODO-subresources-not-supported", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag", "websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]};
var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http", "same-host-wss", "same-host-ws", "cross-origin-wss", "cross-origin-ws"], "subresource": {"blockable": ["iframe-tag", "script-tag", "link-css-tag", "form-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag", "link-prefetch-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-ws", "same-host-ws"], "name": "ws-downgrade-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["no-opt-in", "http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": ["same-host-wss"], "name": "websocket-allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "Redundant-subresources", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "name": "Skip-origins-not-applicable-to-websockets", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]};