summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/appmanifest/icons-member/icons-member-csp-fail-manual.sub.html
blob: e4706011f8437dcad920644dafc313ee7889f659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<meta http-equiv="Content-Security-Policy" content="img-src {{host}}:{{ports[https][1]}}">
<title>Test that icons member is supported (CSP violation)</title>
<link rel="help" href="https://w3c.github.io/manifest#icons-member" />
<link rel="manifest" href="resources/icons-member-csp-fail.webmanifest" />
<script src="resources/icons-member-manual.js"></script>
<h1>Testing support for icons member (CSP violation)</h1>
<script>
    // Force the port of the origin to be ports[https][0] (likely :8443)
    // we treat the port ports[https][1] (likely :8444) to be another origin that we fail against
    if (window.location.origin !== "https://{{host}}:{{ports[https][0]}}") {
        window.location = new URL(window.location.pathname, "https://{{host}}:{{ports[https][0]}}")
    }
</script>
<p>
    To pass, the icon <strong>must not</strong> show a white cross on a red background.
</p>