| <title>CSS subresources of a clean stylesheet should populate resource timing entries, but not for imported stylesheets</title> |
| <script src=/resources/testharness.js></script> |
| <script src=/resources/testharnessreport.js></script> |
| <link href='http://localhost:8080/security/resources/loading-subresources.php' rel='stylesheet' type='text/css' crossorigin="anonymous"> |
| <div id="mydiv" style="font: 12px 'ahem'">Test</div> |
| internals.clearMemoryCache(); |
| internals.invalidateFontCache(); |
| const waitOnLoad = new Promise((resolve) => { |
| return new Promise(resolve => setTimeout(resolve, delay)); |
| document.fonts.ready.then(async () => { |
| const entries = performance.getEntries(); |
| hasImport = entries.some(entry => entry.name.includes('imported-loading-subresources.css')); |
| hasImage = entries.some(entry => entry.name.includes('abe-allow-star.php?image')); |
| hasCursor = entries.some(entry => entry.name.includes('abe-allow-star.php?cursor')); |
| hasFont = entries.some(entry => entry.name.includes('Ahem.woff')); |
| if (hasImport && hasFont && hasCursor) |
| assert_true(hasImport, "import"); |
| assert_false(hasImage, "image"); |
| assert_true(hasCursor, "cursor"); |
| assert_true(hasFont, "font"); |