https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 76fcd56a3903229fb0d9fa84fc1fd91cad108ba9 authored by Hwanseung Lee on 19 March 2018, 01:17:13 UTC
[css-typed-om] support some properties -2-
Tip revision: 76fcd56
subresource-ed25519.tentative.html
<!DOCTYPE html>
<meta charset=utf-8>
<title>Subresource Integrity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/sriharness.js"></script>

<div id="log"></div>

<div id="container"></div>
<script>
    var public_key = "qGFmwTxlocg707D1cX4w60iTwtfwbMLf8ITDyfko7s0="
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes.",
        "ed25519-signature.js?1",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        false,
        "Ed255519 signature, fails because key is malformed.",
        "ed25519-signature.js?2",
        "ed25519-PotatoPotatoPotato"
    ).execute();
    new SRIScriptTest(
        false,
        "Ed255519 signature, fails because wrong key.",
        "ed25519-signature.js?3",
        "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
    ).execute();
    new SRIScriptTest(
        false,
        "Ed255519 signature, fails because no signature in response header.",
        "ed25519-no-signature.js",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        false,
        "Ed255519 signature, fails because incorrect signature in response.",
        "ed25519-broken-signature.js",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes if any (first) of two keys passes.",
        "ed25519-signature.js?4",
        "ed25519-" + public_key +
            " ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato="
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes if any (second) of two keys passes.",
        "ed25519-signature.js?5",
        "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= ed25519-" +
            public_key
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes because at least one signature matches.",
        "ed25519-multi-signature.js",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes (as above), with commas between values.",
        "ed25519-multi-signature2.js",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes (as above), with multiple headers.",
        "ed25519-multi-signature-headers.js",
        "ed25519-" + public_key
    ).execute();
    new SRIScriptTest(
        true,
        "Ed255519 signature, passes, with multiple signature + multiple keys.",
        "ed25519-multi-signature.js?2",
        "ed25519-PotatoPotatoPotatoPotatoPotatoAvocadoPotato= ed25519-" +
            public_key
    ).execute();
</script>

back to top