Skip to content

Commit

Permalink
App history: rename navigateInfo to info
Browse files Browse the repository at this point in the history
Follows WICG/navigation-api#145.

Fixed: 1237539
Bug: 1183545
Change-Id: Icd18658516988346b570485cc9ad912b300df40f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3078659
Commit-Queue: Domenic Denicola <[email protected]>
Commit-Queue: Nate Chapin <[email protected]>
Auto-Submit: Domenic Denicola <[email protected]>
Reviewed-by: Nate Chapin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#909470}
  • Loading branch information
domenic authored and chromium-wpt-export-bot committed Aug 6, 2021
1 parent 5227e9b commit 59d525c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
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

0 comments on commit 59d525c

Please sign in to comment.