| Index: ios/web/public/test/fakes/test_navigation_manager.h
|
| diff --git a/ios/web/public/test/fakes/test_navigation_manager.h b/ios/web/public/test/fakes/test_navigation_manager.h
|
| index e36ebb72ecd50381a8c04c4e8822a63681a99e33..758b29637fe68c33141fba097b638104ef97b06c 100644
|
| --- a/ios/web/public/test/fakes/test_navigation_manager.h
|
| +++ b/ios/web/public/test/fakes/test_navigation_manager.h
|
| @@ -5,7 +5,10 @@
|
| #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_NAVIGATION_MANAGER_H_
|
| #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_NAVIGATION_MANAGER_H_
|
|
|
| +#import "ios/web/public/navigation_item.h"
|
| +#include "ios/web/public/navigation_item_list.h"
|
| #import "ios/web/public/navigation_manager.h"
|
| +#include "ui/base/page_transition_types.h"
|
|
|
| namespace web {
|
|
|
| @@ -42,11 +45,29 @@ class TestNavigationManager : public web::NavigationManager {
|
| void OverrideDesktopUserAgentForNextPendingItem() override;
|
|
|
| // Setters for test data.
|
| + // Sets a value for last committed item that will be returned by
|
| + // GetLastCommittedItem().
|
| void SetLastCommittedItem(NavigationItem* item);
|
| +
|
| + // Sets a value for pending item that will be returned by GetPendingItem().
|
| void SetPendingItem(NavigationItem* item);
|
| +
|
| + // Sets a value for visible item that will be returned by GetVisibleItem().
|
| void SetVisibleItem(NavigationItem* item);
|
|
|
| + // Adds an item to items_. Affects the return values for, GetItemCount(),
|
| + // GetItemAtIndex(), and GetCurrentItemIndex().
|
| + void AddItem(const GURL& url, ui::PageTransition transition);
|
| +
|
| + // Sets the index to be returned by GetCurrentItemIndex(). |index| must be
|
| + // either -1 or between 0 and GetItemCount()-1, inclusively.
|
| + void SetCurrentItemIndex(const int index);
|
| +
|
| private:
|
| + // A list of items constructed by calling AddItem().
|
| + web::ScopedNavigationItemList items_;
|
| + int items_index_;
|
| + // Individual backing instance variables for Set* test set up methods.
|
| NavigationItem* pending_item_;
|
| NavigationItem* last_committed_item_;
|
| NavigationItem* visible_item_;
|
|
|