blob: 8e513a0ed13fce07b475b7ccf1c30b25874e627a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>SRI allows multiple hash values, valid if any passes among strongest</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= sha256-deadbeef",
"sha256-B0/62fJSJFrdjEFR9ba04m/D+LHQ+zG6PGcaR0Trpxg= sha384-Q9AACjOHyATwQh1VMd72WM0mL+U6ImQz+zXxPoUPst4G11y54bV22eL0H6/jTtq/",
];
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>