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