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

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

Issue 2915303002: Added NavigationManager::GetIndexOfItem(). (Closed)
Patch Set: rebase Created 3 years, 7 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 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;
« 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