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

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

Issue 2779383002: implement user agent override option. (Closed)
Patch Set: Rebase Created 3 years, 8 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ios/web/public/test/fakes/test_navigation_manager.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698