Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: ios/web/web_state/navigation_callbacks_inttest.mm

Issue 2931833004: Always set the navigation pending item for page reload. (Closed)
Patch Set: move transietItem to different CL Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/navigation_callbacks_inttest.mm
diff --git a/ios/web/web_state/navigation_callbacks_inttest.mm b/ios/web/web_state/navigation_callbacks_inttest.mm
index ec7867d5c4657691fd1f9a0eef85b9137e2424ca..9df911e2eeddb45a8de7796a0ed4d0bf9a7b137c 100644
--- a/ios/web/web_state/navigation_callbacks_inttest.mm
+++ b/ios/web/web_state/navigation_callbacks_inttest.mm
@@ -87,15 +87,9 @@ ACTION_P3(VerifyPostStartedContext, web_state, url, context) {
EXPECT_FALSE((*context)->GetError());
ASSERT_FALSE((*context)->GetResponseHeaders());
ASSERT_TRUE(web_state->IsLoading());
- // TODO(crbug.com/676129): Reload does not create a pending item. Remove this
- // workaround once the bug is fixed.
- if (!ui::PageTransitionTypeIncludingQualifiersIs(
- ui::PageTransition::PAGE_TRANSITION_RELOAD,
- (*context)->GetPageTransition())) {
- NavigationManager* navigation_manager = web_state->GetNavigationManager();
- NavigationItem* item = navigation_manager->GetPendingItem();
- EXPECT_EQ(url, item->GetURL());
- }
+ NavigationManager* navigation_manager = web_state->GetNavigationManager();
+ NavigationItem* item = navigation_manager->GetPendingItem();
+ EXPECT_EQ(url, item->GetURL());
}
// Verifies correctness of |NavigationContext| (|arg0|) for navigations via POST
@@ -217,9 +211,8 @@ ACTION_P3(VerifyReloadStartedContext, web_state, url, context) {
EXPECT_FALSE((*context)->IsSameDocument());
EXPECT_FALSE((*context)->GetError());
EXPECT_FALSE((*context)->GetResponseHeaders());
- // TODO(crbug.com/676129): Reload does not create a pending item. Check
- // pending item once the bug is fixed.
- EXPECT_FALSE(web_state->GetNavigationManager()->GetPendingItem());
+ EXPECT_EQ(web_state->GetNavigationManager()->GetPendingItem(),
+ web_state->GetNavigationManager()->GetLastCommittedItem());
}
// Verifies correctness of |NavigationContext| (|arg0|) for reload navigation
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698