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

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

Issue 2998463002: Revert of Always set the navigation pending item for page reload. (Closed)
Patch Set: Created 3 years, 4 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 9df911e2eeddb45a8de7796a0ed4d0bf9a7b137c..ec7867d5c4657691fd1f9a0eef85b9137e2424ca 100644
--- a/ios/web/web_state/navigation_callbacks_inttest.mm
+++ b/ios/web/web_state/navigation_callbacks_inttest.mm
@@ -87,9 +87,15 @@
EXPECT_FALSE((*context)->GetError());
ASSERT_FALSE((*context)->GetResponseHeaders());
ASSERT_TRUE(web_state->IsLoading());
- NavigationManager* navigation_manager = web_state->GetNavigationManager();
- NavigationItem* item = navigation_manager->GetPendingItem();
- EXPECT_EQ(url, item->GetURL());
+ // 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());
+ }
}
// Verifies correctness of |NavigationContext| (|arg0|) for navigations via POST
@@ -211,8 +217,9 @@
EXPECT_FALSE((*context)->IsSameDocument());
EXPECT_FALSE((*context)->GetError());
EXPECT_FALSE((*context)->GetResponseHeaders());
- EXPECT_EQ(web_state->GetNavigationManager()->GetPendingItem(),
- web_state->GetNavigationManager()->GetLastCommittedItem());
+ // 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());
}
// 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