Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/soft-navigation-helper.js"></script>
</head>
<body>
<main id="main">
<p><a id="firstlink">Click me!</a></p>
<p><a id="secondlink">Then click me!</a></p>
</main>
<script>
testSoftNavigation({
testName: "first interaction before a soft navigation",
clickTarget: document.getElementById("secondlink"),
extraSetup: async (t) => {
if (test_driver) {
const firstlink = document.getElementById("firstlink");
const clickPromise = new Promise((r) => {
firstlink.addEventListener("click", r, { once: true });
});
test_driver.click(firstlink);
await clickPromise;
}
},
});
</script>
</body>
</html>