blob: d81dd054f836ded2f73237bdfb4bdd2e626dfaf9 [file] [log] [blame]
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
appHistory.onnavigate = e => e.transitionWhile(Promise.resolve());
await appHistory.navigate('/foo', {state: {foo: 1}}).committed;
assert_equals(appHistory.current.getState().foo, 1);
await appHistory.navigate('/foo', {state: {foo: 2}}).committed;
assert_equals(appHistory.current.getState().foo, 2);
}, "navigate() with state should work correctly when called repeatedly - with awaits");
</script>