blob: 82ae71d2444d337e1f751407c5648ac0a8c1ed21 [file] [log] [blame]
<html>
<!--
Note the lack of doctype above: That is intentional. This test
MUST be in quirks mode to have any real testing power.
-->
<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>