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/navigation_test_util.h" | 5 #import "ios/web/public/test/navigation_test_util.h" |
6 | 6 |
7 #import "ios/web/public/navigation_manager.h" | 7 #import "ios/web/public/navigation_manager.h" |
8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
9 using web::NavigationManager; | 13 using web::NavigationManager; |
10 | 14 |
11 namespace web { | 15 namespace web { |
12 namespace test { | 16 namespace test { |
13 | 17 |
14 void LoadUrl(web::WebState* web_state, const GURL& url) { | 18 void LoadUrl(web::WebState* web_state, const GURL& url) { |
15 NavigationManager* navigation_manager = web_state->GetNavigationManager(); | 19 NavigationManager* navigation_manager = web_state->GetNavigationManager(); |
16 NavigationManager::WebLoadParams params(url); | 20 NavigationManager::WebLoadParams params(url); |
17 params.transition_type = ui::PAGE_TRANSITION_TYPED; | 21 params.transition_type = ui::PAGE_TRANSITION_TYPED; |
18 navigation_manager->LoadURLWithParams(params); | 22 navigation_manager->LoadURLWithParams(params); |
19 } | 23 } |
20 | 24 |
21 } // namespace test | 25 } // namespace test |
22 } // namespace web | 26 } // namespace web |
OLD | NEW |