blob: d4e38df667e43a14eed2bb62873fc9b4249981a7 [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>
<link rel="stylesheet"
href="/resources/redirect.py?url=/security/resources/xorigincss1.css"></link>
<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 () {
test(function () {
assert_equals(getBackgroundColorForId('id3'), 'rgb(255, 255, 0)');
}, 'xorigincss1.css should be loaded via &lt;link&gt;');
onloadTest.done();
};
</script>
</head>
<body>
<div id="id3" class="id3"></div>
</body>
</html>