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..b7e4dbeacdc028e5dae3eea8129c29837454c8cf 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 NSNotFound; |
Eugene But (OOO till 7-30)
2017/06/02 18:08:08
s/NSNotFound/-1
kkhorimoto
2017/06/02 18:28:58
Done.
|
+} |
+ |
void TestNavigationManager::SetLastCommittedItemIndex(const int index) { |
DCHECK(index == -1 || index >= 0 && index < GetItemCount()); |
items_index_ = index; |