summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html
blob: 212fe992cf774cdcf5565f64ce0f4edf77b33c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!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);
  const entry = navigation.currentEntry;

  const result = navigation.traverseTo(navigation.currentEntry.key);
  await assertBothFulfill(t, result, entry);

  assert_equals(navigation.entries().length, 1);
  assert_equals(navigation.currentEntry, entry);
}, "traverseTo() with current key");
</script>