chromium/third_party/blink/web_tests/http/tests/security/subresourceIntegrity/subresource-integrity-allowed.html

<!DOCTYPE html>
<html>
    <head>
        <title>Basic allowed hashes</title>
    </head>
    <body>
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <script>
            setup({single_test: true});

            var tests = [
                "",
                "sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg=",
                "sha384-Q9AACjOHyATwQh1VMd72WM0mL+U6ImQz+zXxPoUPst4G11y54bV22eL0H6/jTtq_",
                "sha512-X32tT5fqyvxRgpWsMDFSo4MhhmPobFNqnaWEXMOxxyFKSCKvfHtJU1JA5wjvT6woWmkmybIULJgoI4wex5JD+w==",
            ];

            function scriptError() {
                assert_unreached();
                next();
            };

            function next() {
                if (tests.length == 0) {
                    done();
                    return;
                }

                var script = document.createElement('script');
                script.src = 'call-success.js';
                script.onerror = scriptError;
                script.integrity = tests.shift();
                document.body.appendChild(script);
            }

            var success = next;

            window.onload = function() {
                next();
            };
        </script>
    </body>
</html>