<!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');
test.done();
}));
}, 'Preload scanner should preload resources/style1.css');
</script>
This test requires content_shell --run-web-tests to see the log of what resources are loaded.
<script src=non-existant.js></script>
<script>document.write("<plaintext>");</script>
<base href="resources/foo.html">
<style>
@charset "ascii";
/* */
@import "style1.css";
</style>