blob: c7e64b568d45af3c37cbf432177d1c8432a0be83 [file] [log] [blame]
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async () => {
history.replaceState("state1", "", "#1");
assert_equals(history.state, "state1");
appHistory.onnavigate = e => e.respondWith(Promise.resolve("r"));
let result = await appHistory.navigate("#2");
assert_equals(result, undefined);
assert_equals(location.hash, "#2");
assert_equals(history.state, null);
}, "history.story should be nulled by navigate() handled by respondWith()");
</script>