blob: 1266ee68952edfcf528007e8bb9110c1990ffb39 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<script>
var foo;
var t_script = async_test(
"SRI with script with successful revalidation shouldn't crash");
function revalidate_script() {
var script = document.createElement('script');
script.integrity = "sha256-tbudgBSg+bHWHiHnlteNzN8TUvI80ygS9IULh4rklEw=";
script.onload = t_script.step_func_done();
script.onerror = t_script.unreached_func('Second request should pass');
script.src =
"../../cache/resources/etag.php?revalidation-failed-script";
document.head.appendChild(script);
}
</script>
<script
src="../../cache/resources/etag.php?revalidation-failed-script"
type="text/javascript"
integrity="sha256-tbudgBSg+bHWHiHnlteNzN8TUvI80ygS9IULh4rklEw="
onload="t_script.step_timeout(revalidate_script, 0)"
onerror="t_script.unreached_func('First request should pass')()"
></script>
</html>