Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App history: rename navigateInfo to info #29933

Merged
merged 1 commit into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
assert_equals(e.info, "hi");
});
assert_true(i.contentWindow.appHistory.canGoBack);
i.contentWindow.appHistory.back({ navigateInfo: "hi" });
i.contentWindow.appHistory.back({ info: "hi" });
})
});
}, "navigate event for appHistory.back() - cross-document");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
assert_equals(e.info, "hi");
});
assert_true(appHistory.canGoBack);
appHistory.back({ navigateInfo: "hi" });
appHistory.back({ info: "hi" });
});
}, 0);
}, "navigate event for appHistory.back() - same-document");
Expand Down
4 changes: 2 additions & 2 deletions app-history/navigate-event/navigate-within-onnavigate.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
promise_test(async t => {
appHistory.onnavigate = t.step_func(e => {
if (e.info == 1) {
appHistory.navigate("#2", { navigateInfo: 2 });
appHistory.navigate("#2", { info: 2 });
assert_true(e.defaultPrevented);
}
});
await promise_rejects_dom(t, 'AbortError', appHistory.navigate("#1", { navigateInfo: 1 }));
await promise_rejects_dom(t, 'AbortError', appHistory.navigate("#1", { info: 1 }));
assert_equals(location.hash, "#2");
}, "if navigate() is called inside onnavigate, the previous navigation and navigate event are cancelled");
</script>
2 changes: 1 addition & 1 deletion app-history/navigate/navigate-info-and-state.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
onnavigated_called = true;
assert_equals(e.info, navInfo)
});
await appHistory.navigate("#1", { navigateInfo: navInfo, state: navState });
await appHistory.navigate("#1", { info: navInfo, state: navState });
assert_true(onnavigated_called);
assert_not_equals(appHistory.current.getState(), navState);
assert_equals(appHistory.current.getState().statevar, navState.statevar);
Expand Down
2 changes: 1 addition & 1 deletion app-history/navigate/navigate-without-url-arg-replace.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
onnavigate_called = true;
assert_equals(e.info, navInfo);
});
i.contentWindow.appHistory.navigate({ replace: true, navigateInfo: navInfo });
i.contentWindow.appHistory.navigate({ replace: true, info: navInfo });
i.onload = t.step_func_done(() => {
assert_true(onnavigate_called);
assert_equals(start_url, i.contentWindow.location.href);
Expand Down
2 changes: 1 addition & 1 deletion app-history/navigate/navigate-without-url-arg.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
onnavigate_called = true;
assert_equals(e.info, navInfo);
});
i.contentWindow.appHistory.navigate({ navigateInfo: navInfo });
i.contentWindow.appHistory.navigate({ info: navInfo });
i.onload = t.step_func_done(() => {
assert_true(onnavigate_called);
assert_equals(start_url, i.contentWindow.location.href);
Expand Down