blob: 4ea759739871f61ce5bdb185b893404c398783d2 [file] [log] [blame]
<script src=resources/common.js></script>
<script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script>
<!-- Note that Priority Hints take no affect on the pending parsing-blocking
script, as it _must_ be high-prioritized for good user experience -->
<script id="script" src="../resources/dummy.js" importance="low"></script>
<script>
const t = async_test('Priority Hints is use-counted when the importance ' +
'content attribute is parsed on <script>s that are ' +
'fetched by the preload scanner');
window.onload = t.step_func_done(() => {
assert_true(internals.isPreloaded(script.src),
'The <script> resource was fetched by the preload scanner');
assert_true(internals.isUseCounted(document, kPriorityHints),
'Priority Hints is use-counted when the preload scanner ' +
'fetches a <script> with an importance attribute');
});
</script>