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 972efdcac3ce063fbf2893d2ae9e8bc60fb1007a..c1c0125b1ffd7b5bec3a2d1af9ff993006c360b1 100644 |
--- a/ios/web/public/test/fakes/test_navigation_manager.mm |
+++ b/ios/web/public/test/fakes/test_navigation_manager.mm |
@@ -75,6 +75,15 @@ |
return items_[index].get(); |
} |
+int TestNavigationManager::GetIndexOfItem( |
+ const web::NavigationItem* item) const { |
+ for (size_t index = 0; index < items_.size(); ++index) { |
+ if (items_[index].get() == item) |
+ return index; |
+ } |
+ return -1; |
+} |
+ |
void TestNavigationManager::SetLastCommittedItemIndex(const int index) { |
DCHECK(index == -1 || index >= 0 && index < GetItemCount()); |
items_index_ = index; |