Use PAGE_TRANSITION_RELOAD transition type for restored items.
This makes iOS consistent with other platforms that use reload transition type to avoid incorrect increase for typed count. Bug: 888011 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I7fe963391c00c077bd41bd3235e93396046939ce Reviewed-on: https://chromium-review.googlesource.com/1243573 Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#594105}
This commit is contained in:
ios/web
@ -46,6 +46,8 @@ NavigationItemStorageBuilder::BuildNavigationItemImpl(
|
||||
item->page_display_state_ = navigation_item_storage.displayState;
|
||||
item->should_skip_repost_form_confirmation_ =
|
||||
navigation_item_storage.shouldSkipRepostFormConfirmation;
|
||||
// Use reload transition type to avoid incorrect increase for typed count.
|
||||
item->transition_type_ = ui::PAGE_TRANSITION_RELOAD;
|
||||
item->user_agent_type_ = navigation_item_storage.userAgentType;
|
||||
item->post_data_ = navigation_item_storage.POSTData;
|
||||
item->http_request_headers_ =
|
||||
|
@ -490,10 +490,9 @@ ACTION_P4(VerifyRestorationStartedContext, web_state, url, context, nav_id) {
|
||||
EXPECT_NE(0, *nav_id);
|
||||
EXPECT_EQ(url, (*context)->GetUrl());
|
||||
EXPECT_TRUE((*context)->HasUserGesture());
|
||||
// Transition type is not restored (crbug.com/888011).
|
||||
ui::PageTransition actual_transition = (*context)->GetPageTransition();
|
||||
EXPECT_TRUE(PageTransitionCoreTypeIs(ui::PageTransition::PAGE_TRANSITION_LINK,
|
||||
actual_transition))
|
||||
EXPECT_TRUE(PageTransitionCoreTypeIs(
|
||||
ui::PageTransition::PAGE_TRANSITION_RELOAD, actual_transition))
|
||||
<< "Got unexpected transition: " << actual_transition;
|
||||
EXPECT_FALSE((*context)->IsSameDocument());
|
||||
EXPECT_FALSE((*context)->HasCommitted());
|
||||
@ -526,10 +525,9 @@ ACTION_P5(VerifyRestorationFinishedContext,
|
||||
EXPECT_EQ(*nav_id, (*context)->GetNavigationId());
|
||||
EXPECT_EQ(url, (*context)->GetUrl());
|
||||
EXPECT_TRUE((*context)->HasUserGesture());
|
||||
// Transition type is not restored (crbug.com/888011).
|
||||
ui::PageTransition actual_transition = (*context)->GetPageTransition();
|
||||
EXPECT_TRUE(PageTransitionCoreTypeIs(ui::PageTransition::PAGE_TRANSITION_LINK,
|
||||
actual_transition))
|
||||
EXPECT_TRUE(PageTransitionCoreTypeIs(
|
||||
ui::PageTransition::PAGE_TRANSITION_RELOAD, actual_transition))
|
||||
<< "Got unexpected transition: " << actual_transition;
|
||||
EXPECT_FALSE((*context)->IsSameDocument());
|
||||
EXPECT_TRUE((*context)->HasCommitted());
|
||||
|
Reference in New Issue
Block a user