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

Unified Diff: ios/web/public/test/fakes/test_navigation_manager.mm

Issue 2766063002: Remove the concept of currentItemIndex (Closed)
Patch Set: fix unit tests Created 3 years, 9 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 | « ios/web/public/test/fakes/test_navigation_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/test_navigation_manager.mm
diff --git a/ios/web/public/test/fakes/test_navigation_manager.mm b/ios/web/public/test/fakes/test_navigation_manager.mm
index 49cbc3b984ae419b0a460b60a6ee83a146ae17d1..1c95c4e52e637b94b397e699ab1e3e573ec58096 100644
--- a/ios/web/public/test/fakes/test_navigation_manager.mm
+++ b/ios/web/public/test/fakes/test_navigation_manager.mm
@@ -79,18 +79,13 @@
return items_[index].get();
}
-int TestNavigationManager::GetCurrentItemIndex() const {
- return items_index_;
-}
-
-void TestNavigationManager::SetCurrentItemIndex(const int index) {
+void TestNavigationManager::SetLastCommittedItemIndex(const int index) {
DCHECK(index == -1 || index >= 0 && index < GetItemCount());
items_index_ = index;
}
int TestNavigationManager::GetLastCommittedItemIndex() const {
- NOTREACHED();
- return 0;
+ return items_index_;
}
int TestNavigationManager::GetPendingItemIndex() const {
@@ -171,7 +166,7 @@
items_.push_back(web::NavigationItem::Create());
items_.back()->SetTransitionType(transition);
items_.back()->SetURL(url);
- SetCurrentItemIndex(GetItemCount() - 1);
+ SetLastCommittedItemIndex(GetItemCount() - 1);
}
} // namespace web
« no previous file with comments | « ios/web/public/test/fakes/test_navigation_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698