blob: e3b3770a043b7f1859c4315958db3c314bd4dd95 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Cross-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 cross-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>