Chromium Code Reviews| Index: ios/web/public/test/web_test_with_web_state.mm |
| diff --git a/ios/web/public/test/web_test_with_web_state.mm b/ios/web/public/test/web_test_with_web_state.mm |
| index 9ee621e25276d62409c556f40ac4e203b2dc5f8d..c9e5c832ecea4bbc9f7198da13023132eb47c98b 100644 |
| --- a/ios/web/public/test/web_test_with_web_state.mm |
| +++ b/ios/web/public/test/web_test_with_web_state.mm |
| @@ -7,6 +7,7 @@ |
| #include "base/run_loop.h" |
| #include "base/strings/sys_string_conversions.h" |
| #import "base/test/ios/wait_util.h" |
| +#import "ios/web/navigation/navigation_manager_impl.h" |
| #include "ios/web/public/web_state/url_verification_constants.h" |
| #include "ios/web/public/web_state/web_state_observer.h" |
| #import "ios/web/web_state/ui/crw_web_controller.h" |
| @@ -148,6 +149,15 @@ void NavigationItemCommitted(const LoadCommittedDetails&) override { |
| return web_state_.get(); |
| } |
| +void WebTestWithWebState::AddPendingItem(const GURL& url, |
| + ui::PageTransition transition) { |
| + WebStateImpl* web_state = static_cast<web::WebStateImpl*>(web_state_.get()); |
| + web_state->GetNavigationManagerImpl().AddPendingItem( |
|
Eugene But (OOO till 7-30)
2017/04/04 18:22:31
GetWebController(web_state())->GetNavigationManage
liaoyuke
2017/04/04 21:15:40
Done.
|
| + url, Referrer(), transition, |
| + web::NavigationInitiationType::USER_INITIATED, |
| + web::NavigationManager::UserAgentOverrideOption::INHERIT); |
| +} |
| + |
| void WebTestWithWebState::WillProcessTask(const base::PendingTask&) { |
| // Nothing to do. |
| } |