summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html')
-rw-r--r--testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html b/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html
new file mode 100644
index 0000000000..b5550bb382
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link id=style_link rel=stylesheet>
+<script>
+ async_test(t => {
+ const link = document.querySelector('#style_link');
+ link.onerror = t.unreached_func('Sheet should load successfully');
+ link.onload = t.step_func(() => {
+ link.onload = t.step_func_done(() => {});
+ link.href = 'style.css?second';
+ });
+
+ link.href = 'style.css?first';
+
+ }, "Check if the <link>'s load event fires for each stylesheet it loads");
+ </script>
+</head>
+</html>