static-resource.html (2358B)
1 <!DOCTYPE html> 2 <head> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resource-timing/resources/observe-entry.js"></script> 6 <script src="../../resources/test-initiator.js"></script> 7 <script src="/common/get-host-info.sub.js"></script> 8 9 <!-- Empty Blocking Script --> 10 <script src="../../resources/empty.js?blocking"></script> 11 <!-- Empty Preloaded Script --> 12 <link rel="preload" href="../../resources/display_paragraph.js" as="script" /> 13 <!-- Loading arbitrary Empty Blocking Async Script --> 14 <script async src="../../resources/empty.js?async"></script> 15 <!-- Loading arbitrary Empty Deferred Script --> 16 <script defer src="../../resources/empty.js?deferred"></script> 17 <!-- Loading arbitrary Empty Module Script --> 18 <script type="module" src="../../resources/empty.js?module"></script> 19 <!-- Empty Stylesheet --> 20 <link rel="stylesheet" href="../../resources/empty_style.css?link" /> 21 <script src="../../resources/display_paragraph.js"></script> 22 <!-- Inline Styles --> 23 <style> 24 body { 25 background-image: url("/images/blue.png?inline-style"); 26 font-family: remoteFont, sans-serif; 27 } 28 @font-face { 29 font-family: remoteFont; 30 /* This query parameter ensures that the Ahem.ttf is not retrieved from the cache. */ 31 src: url("/fonts/Ahem.ttf?initiator-html"); 32 } 33 </style> 34 </head> 35 <body> 36 <!-- Loading an arbitrary Image using <img> tag --> 37 <img 38 src="/images/blue.png?using-Img-tag" 39 alt="Sample Image for testing initiator Attribute" 40 /> 41 42 <iframe src="../../resources/green.html"></iframe> 43 44 <script> 45 display_paragraph(); 46 47 const hostInfo = get_host_info(); 48 const expectedInitiatorUrl = hostInfo["ORIGIN"] + 49 "/resource-timing/tentative/initiator-url/static-resource.html"; 50 51 const resources = [ 52 "empty.js?blocking", 53 "display_paragraph.js", 54 "empty.js?async", 55 "empty.js?deferred", 56 "empty.js?module", 57 "empty_style.css?link", 58 "blue.png?inline-style", 59 "Ahem.ttf?initiator-html", 60 "blue.png?using-Img-tag", 61 "green.html", 62 ]; 63 for (const resource of resources) { 64 initiator_url_test(resource, expectedInitiatorUrl, resource+ 65 " initiatorUrl from static-resource", resource+" timeout"); 66 } 67 68 </script> 69 </body>