mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-27 10:53:28 -04:00
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<script src="../testing.js"></script>
|
|
|
|
<script id=history>
|
|
testing.expectEqual('auto', history.scrollRestoration);
|
|
|
|
history.scrollRestoration = 'manual';
|
|
history.scrollRestoration = 'foo';
|
|
testing.expectEqual('manual', history.scrollRestoration);
|
|
|
|
history.scrollRestoration = 'auto';
|
|
testing.expectEqual('auto', history.scrollRestoration);
|
|
testing.expectEqual(null, history.state)
|
|
|
|
history.pushState({ testInProgress: true }, null, 'http://127.0.0.1:9582/xhr/json');
|
|
testing.expectEqual({ testInProgress: true }, history.state);
|
|
|
|
history.replaceState({ "new": "field", testComplete: true }, null);
|
|
let state = { "new": "field", testComplete: true };
|
|
testing.expectEqual(state, history.state);
|
|
|
|
testing.expectEqual(undefined, history.back());
|
|
testing.expectEqual(undefined, history.forward());
|
|
|
|
testing.onPageWait(() => {
|
|
testing.expectEqual(true, history.state && history.state.testComplete);
|
|
testing.expectEqual(state, history.state);
|
|
});
|
|
|
|
testing.expectEqual(undefined, history.go());
|
|
</script>
|