blob: e73bc55f73563999f1d69bf7f5481717e0ccaeea [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>
@import "/resources/redirect.php?url=http://localhost:8000/security/resources/xorigincss2.css";
</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('id6'), 'rgb(255, 255, 0)');
}, 'xorigincss2.css should be loaded.');
onloadTest.done();
};
</script>
</head>
<body>
<div id="id6" class="id6"></div>
</body>
</html>