Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test that no load or error events fire for <link rel="icon"> #26557

Merged
merged 3 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions html/links/icon/no-error-event.sub.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<title>&lt;link rel="icon"&gt; doesn't fire an error event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test((t) => {
const link = document.createElement("link");
link.rel = "icon";
link.href = "http://{{hosts[][nonexistent]}}";

link.addEventListener("error", t.unreached_func());
document.head.append(link);
t.step_timeout(() => t.done(), 2000);
}, document.title);
</script>
16 changes: 16 additions & 0 deletions html/links/icon/no-load-event.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<title>&lt;link rel="icon"&gt; doesn't fire a load event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test((t) => {
const link = document.createElement("link");
link.rel = "icon";
link.href = "/images/wpt-logo/wpt-logo-darkblue-bg.svg";

link.addEventListener("load", t.unreached_func());
document.head.append(link);
t.step_timeout(() => t.done(), 2000);
}, document.title);
</script>