| <script src=resources/common.js></script> |
| <script src=../resources/testharness.js></script> |
| <script src=../resources/testharnessreport.js></script> |
| |
| <link id="link" rel="preload" as="script" href="../resources/dummy.js" importance="low"> |
| |
| <script> |
| const t = async_test('Priority Hints is use-counted when the importance ' + |
| 'content attribute is parsed on <link>s that are ' + |
| 'fetched by the preload scanner'); |
| |
| window.onload = t.step_func_done(() => { |
| assert_true(internals.isPreloaded(link.href), |
| 'The <link> resource was fetched by the preload scanner'); |
| assert_true(internals.isUseCounted(document, kPriorityHints), |
| 'Priority Hints is use-counted when the preload scanner ' + |
| 'fetches a <link> with an importance attribute'); |
| }); |
| </script> |