| <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> |