blob: 7bfc4c2d4a04b5bd85454f4dbc1d7bc891f0037e [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>
@import "resources/xorigincss5.html";
</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 () {
test(function () {
assert_equals(getBackgroundColorForId('id7'), 'rgb(255, 255, 0)');
}, 'xorigincss5.html should be loaded via @import.');
onloadTest.done();
};
</script>
</head>
<body>
<div id="id7" class="id7"></div>
</body>
</html>