blob: 2fd1dcca06e1fd6359541683a6b01ab1ec254eeb [file] [log] [blame]
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
async_test(test => {
window.addEventListener('DOMContentLoaded', test.step_func(function() {
assert_own_property(window, 'internals', 'This test requires internals.isPreloaded()');
assert_true(internals.isPreloaded('resources/style1.css'), 'resources/style1.css should be preloaded');
assert_false(internals.isPreloaded('resources/fail.css'), 'resources/fail.css should not be preloaded');
test.done();
}));
}, 'Preload scanner should preload resources/style1.css but not resources/fail.css');
</script>
This test requires DumpRenderTree to see the log of what resources are loaded.
<script src=resources/non-existant.js></script>
<script>document.write("<plaintext>");</script>
<style>
@charset "ascii";
/* */
@import "resources/style1.css";
em {
@import "resources/fail.css";
}
@import "resources/fail.css";
</style>
<style>
@media print {
@import "resources/fail.css";
}
@import "resources/fail.css";
</style>