OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/navigation/navigation_manager_impl.h" | 5 #import "ios/web/navigation/navigation_manager_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #import "ios/web/navigation/crw_session_controller+private_constructors.h" | 9 #import "ios/web/navigation/crw_session_controller+private_constructors.h" |
10 #import "ios/web/navigation/navigation_manager_delegate.h" | 10 #import "ios/web/navigation/navigation_manager_delegate.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
508 } | 508 } |
509 | 509 |
510 // Tests that desktop user agent can be enforced to use for next pending item. | 510 // Tests that desktop user agent can be enforced to use for next pending item. |
511 TEST_F(NavigationManagerTest, OverrideDesktopUserAgent) { | 511 TEST_F(NavigationManagerTest, OverrideDesktopUserAgent) { |
512 navigation_manager()->OverrideDesktopUserAgentForNextPendingItem(); | 512 navigation_manager()->OverrideDesktopUserAgentForNextPendingItem(); |
513 navigation_manager()->AddPendingItem( | 513 navigation_manager()->AddPendingItem( |
514 GURL("http://www.url.com"), Referrer(), ui::PAGE_TRANSITION_TYPED, | 514 GURL("http://www.url.com"), Referrer(), ui::PAGE_TRANSITION_TYPED, |
515 web::NavigationInitiationType::USER_INITIATED); | 515 web::NavigationInitiationType::USER_INITIATED); |
516 [session_controller() commitPendingItem]; | 516 [session_controller() commitPendingItem]; |
517 NavigationItem* visible_item = navigation_manager()->GetVisibleItem(); | 517 NavigationItem* visible_item = navigation_manager()->GetVisibleItem(); |
518 EXPECT_TRUE(visible_item->IsOverridingUserAgent()); | 518 EXPECT_EQ(visible_item->GetUserAgentType(), UserAgentType::DESKTOP); |
519 } | 519 } |
520 | 520 |
Eugene But (OOO till 7-30)
2017/02/25 01:51:52
There was quite a few logic changes in the code. C
kkhorimoto
2017/02/27 23:29:04
Done.
| |
521 } // namespace web | 521 } // namespace web |
OLD | NEW |