| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/web/public/test/fakes/test_navigation_manager.h" | 5 #import "ios/web/public/test/fakes/test_navigation_manager.h" |
| 6 | 6 |
| 7 namespace web { | 7 namespace web { |
| 8 | 8 |
| 9 TestNavigationManager::TestNavigationManager() | 9 TestNavigationManager::TestNavigationManager() |
| 10 : items_index_(-1), | 10 : items_index_(-1), |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void TestNavigationManager::CopyStateFromAndPrune( | 148 void TestNavigationManager::CopyStateFromAndPrune( |
| 149 const NavigationManager* source) { | 149 const NavigationManager* source) { |
| 150 NOTREACHED(); | 150 NOTREACHED(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool TestNavigationManager::CanPruneAllButLastCommittedItem() const { | 153 bool TestNavigationManager::CanPruneAllButLastCommittedItem() const { |
| 154 NOTREACHED(); | 154 NOTREACHED(); |
| 155 return false; | 155 return false; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void TestNavigationManager::OverrideDesktopUserAgentForNextPendingItem() { | |
| 159 NOTREACHED(); | |
| 160 } | |
| 161 | |
| 162 // Adds a new navigation item of |transition| type at the end of this | 158 // Adds a new navigation item of |transition| type at the end of this |
| 163 // navigation manager. | 159 // navigation manager. |
| 164 void TestNavigationManager::AddItem(const GURL& url, | 160 void TestNavigationManager::AddItem(const GURL& url, |
| 165 ui::PageTransition transition) { | 161 ui::PageTransition transition) { |
| 166 items_.push_back(web::NavigationItem::Create()); | 162 items_.push_back(web::NavigationItem::Create()); |
| 167 items_.back()->SetTransitionType(transition); | 163 items_.back()->SetTransitionType(transition); |
| 168 items_.back()->SetURL(url); | 164 items_.back()->SetURL(url); |
| 169 SetLastCommittedItemIndex(GetItemCount() - 1); | 165 SetLastCommittedItemIndex(GetItemCount() - 1); |
| 170 } | 166 } |
| 171 | 167 |
| 172 } // namespace web | 168 } // namespace web |
| OLD | NEW |