blob: 2a93abf9937942200d4c2d28c8051456de438003 [file] [log] [blame]
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<a id="a" href="#foo"></a>
<script>
test(t => {
let oncurrentchange_called = false;
appHistory.oncurrentchange = t.step_func(e => {
oncurrentchange_called = true;
assert_equals(e.from, appHistory.entries()[0]);
assert_equals(e.from.index, 0);
assert_equals(e.navigationType, "push");
assert_equals(appHistory.current.index, 1);
});
a.click();
assert_true(oncurrentchange_called);
}, "AppHistoryCurrentChangeEvent fires for link click");
</script>