blob: b2316ef6f5d40ef04673a3977bd39f9f611cd984 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Same-origin CSS</title>
<script>
// Prune memory cache to make sure we don't use a cached parsed stylesheet, in which case
// the console warning would not be shown and the test would be flaky.
internals.pruneMemoryCacheToSize(0);
</script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#data-background-url {
content: "PASS (image loaded)";
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='0px' height='0px'></svg>");
}
</style>
<script>
function getBackgroundColorForId(id) {
return window.getComputedStyle(document.getElementById(id), null).getPropertyValue('background-color')
}
var onloadTest = async_test("Testing same-origin and MIME behavior for CSS.");
window.onload = function () {
onloadTest.done();
};
</script>
</head>
<body>
<p>Check that data: is still allowed for non-CORS cross-origin image fetches.</p>
<div id="data-background-url">PASS background image loaded</div>
</body>
</html>