<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/helpers.js"></script>

<script>
promise_test(async t => {
  assert_equals(navigation.entries().length, 1);
  assert_equals(navigation.entries()[0], navigation.currentEntry);
  assert_false(navigation.canGoBack);
  assert_false(navigation.canGoForward);

  await assertBothRejectDOM(t, navigation.back(), "InvalidStateError");
  await assertBothRejectDOM(t, navigation.forward(), "InvalidStateError");
}, "back() and forward() out of bounds");
</script>
