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

Side by Side Diff: ios/web/public/test/fakes/test_navigation_manager.mm

Issue 2745873002: Created NavigationManager::CopyStateFromAndPrune(). (Closed)
Patch Set: Added no-op tests, addressed Eugene's comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 NavigationItemList TestNavigationManager::GetBackwardItems() const { 143 NavigationItemList TestNavigationManager::GetBackwardItems() const {
144 NOTREACHED(); 144 NOTREACHED();
145 return NavigationItemList(); 145 return NavigationItemList();
146 } 146 }
147 147
148 NavigationItemList TestNavigationManager::GetForwardItems() const { 148 NavigationItemList TestNavigationManager::GetForwardItems() const {
149 NOTREACHED(); 149 NOTREACHED();
150 return NavigationItemList(); 150 return NavigationItemList();
151 } 151 }
152 152
153 void TestNavigationManager::CopyStateFromAndPrune(
154 const NavigationManager* source) {
155 NOTREACHED();
156 }
157
158 bool TestNavigationManager::CanPruneAllButLastCommittedItem() const {
159 NOTREACHED();
160 return false;
161 }
162
153 void TestNavigationManager::OverrideDesktopUserAgentForNextPendingItem() { 163 void TestNavigationManager::OverrideDesktopUserAgentForNextPendingItem() {
154 NOTREACHED(); 164 NOTREACHED();
155 } 165 }
156 166
157 // Adds a new navigation item of |transition| type at the end of this 167 // Adds a new navigation item of |transition| type at the end of this
158 // navigation manager. 168 // navigation manager.
159 void TestNavigationManager::AddItem(const GURL& url, 169 void TestNavigationManager::AddItem(const GURL& url,
160 ui::PageTransition transition) { 170 ui::PageTransition transition) {
161 items_.push_back(web::NavigationItem::Create()); 171 items_.push_back(web::NavigationItem::Create());
162 items_.back()->SetTransitionType(transition); 172 items_.back()->SetTransitionType(transition);
163 items_.back()->SetURL(url); 173 items_.back()->SetURL(url);
164 SetCurrentItemIndex(GetItemCount() - 1); 174 SetCurrentItemIndex(GetItemCount() - 1);
165 } 175 }
166 176
167 } // namespace web 177 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698