blob: a61d09034d1cfb029d1e148db227728d8e0d238d [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>Detect simple soft navigation.</title>
<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>
<a id=link>Click me!</a>
</main>
<script>
const link = document.getElementById("link");
test_soft_navigation(json => {
// Add the content to the main element
const main = document.getElementById("main");
const content = document.createTextNode(json["content"]);
main.appendChild(content);
}, link, /*push_state=*/true,
/*clicks=*/52, (entries, options)=>{assert_equals(
options['droppedEntriesCount'], 2);
},
"Test that a soft navigation is detected when the click is done "
+ "on a custom element.");
</script>
</body>
</html>