| Index: ios/shared/chrome/browser/tabs/web_state_list_unittest.mm
|
| diff --git a/ios/shared/chrome/browser/tabs/web_state_list_unittest.mm b/ios/shared/chrome/browser/tabs/web_state_list_unittest.mm
|
| index 2d2d149b6df6dbdb38c8f974efcff2268caf7d6d..bc06f5c4bc90da64ea5ae1f4edadf7aa2dc02e52 100644
|
| --- a/ios/shared/chrome/browser/tabs/web_state_list_unittest.mm
|
| +++ b/ios/shared/chrome/browser/tabs/web_state_list_unittest.mm
|
| @@ -111,27 +111,29 @@ void WebStateDetachedAt(WebStateList* web_state_list,
|
| FakeNavigationManager() = default;
|
|
|
| // web::NavigationManager implementation.
|
| - int GetCurrentItemIndex() const override { return current_item_index_; }
|
| -
|
| - int GetLastCommittedItemIndex() const override { return current_item_index_; }
|
| + int GetLastCommittedItemIndex() const override {
|
| + return last_committed_item_index;
|
| + }
|
|
|
| - bool CanGoBack() const override { return current_item_index_ > 0; }
|
| + bool CanGoBack() const override { return last_committed_item_index > 0; }
|
|
|
| - bool CanGoForward() const override { return current_item_index_ < INT_MAX; }
|
| + bool CanGoForward() const override {
|
| + return last_committed_item_index < INT_MAX;
|
| + }
|
|
|
| void GoBack() override {
|
| DCHECK(CanGoBack());
|
| - --current_item_index_;
|
| + --last_committed_item_index;
|
| }
|
|
|
| void GoForward() override {
|
| DCHECK(CanGoForward());
|
| - ++current_item_index_;
|
| + ++last_committed_item_index;
|
| }
|
|
|
| - void GoToIndex(int index) override { current_item_index_ = index; }
|
| + void GoToIndex(int index) override { last_committed_item_index = index; }
|
|
|
| - int current_item_index_ = 0;
|
| + int last_committed_item_index = 0;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeNavigationManager);
|
| };
|
|
|