Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 4 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-hosts.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>Embedded Enforcement: Subsumption Algorithm - Host parts in host source expressions.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/testharness-helper.sub.js"></script>
</head>
<body>
<script>
var tests = [
{ "name": "Host must match.",
"expected": IframeLoad.EXPECT_BLOCK },
{ "name": "Hosts without wildcards must match.",
"expected": IframeLoad.EXPECT_BLOCK },
{ "name": "More specific subdomain should not match.",
"expected": IframeLoad.EXPECT_BLOCK },
{ "name": "Specified host should not match a wildcard host.",
"expected": IframeLoad.EXPECT_BLOCK },
{ "name": "A wildcard host should match a more specific host.",
"expected": IframeLoad.EXPECT_LOAD },
];
tests.forEach(test => {
async_test(t => {
var url = generateUrlWithPolicies(Host.CROSS_ORIGIN, test.returned_csp);
assert_iframe_with_csp(t, url, test.required_csp, test.expected, test.name, null);
}, test.name);
});
</script>
</body>
</html>