<!DOCTYPE html>
<meta http-equiv="Content-Security-Policy" content="img-src http://*/content-security-policy/generic/support;">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
    var t = async_test("Test that using a wildcard in the host component will still check for a match in the path component");
    window.addEventListener("securitypolicyviolation", t.step_func_done((e) => {
        assert_equals(e.violatedDirective, "img-src");
        assert_equals(e.blockedURI, "http://{{domains[www2]}}:{{ports[http][0]}}/content-security-policy/support/fail.png");
    }));
</script>
<img src="http://{{domains[www2]}}:{{ports[http][0]}}/content-security-policy/support/fail.png"
     onload="t.step(() => { assert_unreached('image should not have loaded.'); t.done(); });">
</body>
