blob: b348f8f04ccce41ca9b57e5a64e6bf69e0bea32b [file] [log] [blame]
<script src=resources/common.js></script>
<script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script>
<script>clearUseCounter()</script>
<img id="img" src="../resources/dummy.png" importance="low">
<script>
const t = async_test('Priority Hints is use-counted when the importance ' +
'content attribute is parsed on <img>s that are ' +
'fetched by the preload scanner');
window.onload = t.step_func_done(() => {
assert_true(internals.isPreloaded(img.src),
'The <img> resource was ' + 'fetched by the preload scanner');
assert_true(internals.isUseCounted(document, kPriorityHints),
'Priority Hints is use-counted when the preload scanner ' +
'fetches an <img> with an importance attribute');
});
</script>