| <title>Same-origin CSS</title> |
| // 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 src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| @import "resources/xorigincss5.html"; |
| 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 () { |
| assert_equals(getBackgroundColorForId('id7'), 'rgba(0, 0, 0, 0)'); |
| }, 'xorigincss5.html should not be loaded.'); |
| <div id="id7" class="id7"></div> |