summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html')
-rw-r--r--testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html b/testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html
new file mode 100644
index 0000000000..212fe992cf
--- /dev/null
+++ b/testing/web-platform/tests/navigation-api/navigation-methods/return-value/traverseTo-current.html
@@ -0,0 +1,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>