blob: e0c7ff61ae57d901a0dcec70f237d95e38c87ad1 [file] [log] [blame]
<!DOCTYPE html>
<head>
<title>SRI on cross origin CORS disabled style, without CORS fetch</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({single_test: true});
function styleLoad() {
assert_unreached('Style loaded.');
}
</script>
<style>.id1 { background-color: red }</style>
<link rel="stylesheet"
onload="styleLoad();"
integrity="sha256-fy1lC6jbv7rOG6Flb00n5PYLggqe25IcE6QlZf8KtwI="
href="http://localhost:8000/security/resources/cors-style.php?cors=false"></link>
</head>
<body>
<script>
window.onload = function () {
var ele = document.getElementById('id1');
var divBackground = window.getComputedStyle(ele, null).getPropertyValue('background-color');
assert_equals(divBackground, "rgb(255, 0, 0)");
done();
};
</script>
<div id="id1" class="id1"></div>
</body>
</html>