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

Unified Diff: ios/web/web_state/ui/crw_web_controller_unittest.mm

Issue 2779383002: implement user agent override option. (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller_unittest.mm
diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm
index ff3099e6205d0b02fbad49d50a489886f27a80ef..4b34cba3635a9402c0ed83e8aa2da5673a61b779 100644
--- a/ios/web/web_state/ui/crw_web_controller_unittest.mm
+++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
@@ -641,7 +641,8 @@ void TearDown() override {
TEST_F(CRWWebControllerTest, WebUrlWithTrustLevel) {
[web_controller() webStateImpl]->GetNavigationManagerImpl().AddPendingItem(
GURL("http://chromium.test"), web::Referrer(), ui::PAGE_TRANSITION_TYPED,
- web::NavigationInitiationType::USER_INITIATED);
+ web::NavigationInitiationType::USER_INITIATED,
+ web::NavigationManager::UserAgentOverrideOption::INHERIT);
[[[mock_web_view_ stub] andReturnBool:NO] hasOnlySecureContent];
[[[mock_web_view_ stub] andReturn:@""] title];
@@ -678,7 +679,8 @@ void Load(const GURL& URL) {
[web_controller() webStateImpl]->GetNavigationManagerImpl();
navigation_manager.AddPendingItem(
URL, web::Referrer(), ui::PAGE_TRANSITION_TYPED,
- web::NavigationInitiationType::USER_INITIATED);
+ web::NavigationInitiationType::USER_INITIATED,
+ web::NavigationManager::UserAgentOverrideOption::INHERIT);
[web_controller() loadCurrentURL];
}
@@ -923,9 +925,10 @@ id ExecuteUserJavaScript(NSString* java_script, NSError** error) {
// Change last committed URL to app-specific URL.
web::NavigationManagerImpl& nav_manager =
[web_controller() webStateImpl]->GetNavigationManagerImpl();
- nav_manager.AddPendingItem(GURL(kTestAppSpecificURL), web::Referrer(),
- ui::PAGE_TRANSITION_TYPED,
- web::NavigationInitiationType::USER_INITIATED);
+ nav_manager.AddPendingItem(
+ GURL(kTestAppSpecificURL), web::Referrer(), ui::PAGE_TRANSITION_TYPED,
+ web::NavigationInitiationType::USER_INITIATED,
+ web::NavigationManager::UserAgentOverrideOption::INHERIT);
[nav_manager.GetSessionController() commitPendingItem];
NSError* error = nil;
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698