[Curl] Fix r222147
[WebKit-https.git] / LayoutTests / http / wpt / resource-timing / rt-initiatorType-css.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Resource Timing - CSS initiatorType</title>
6 <link rel="help" href="https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-initiatortype">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <script src="resources/rt-utilities.sub.js"></script>
10 </head>
11 <body>
12 <h1>Resource Timing: CSS initiatorType</h1>
13 <div id="log"></div>
14 <script>
15 resource_entry_type_test({
16     name: "css - background-image",
17     url: uniqueImageURL("background-image"),
18     initiatorType: "css",
19     generateResource(url) {
20         let div = document.createElement("div");
21         div.style.width = div.style.height = "100px";
22         div.style.backgroundImage = `url(${url})`;
23         document.body.appendChild(div);
24     },
25 });
26
27 resource_entry_type_test({
28     name: "css - @import",
29     url: uniqueStylesheetURL("import"),
30     initiatorType: "css",
31     generateResource(url) {
32         let style = document.createElement("style");
33         style.textContent = `@import "${url}"`;
34         document.head.appendChild(style);
35     }
36 });
37 </script>
38 </body>
39 </html>