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

Unified Diff: ios/web/navigation/navigation_manager_impl_unittest.mm

Issue 2798813002: Revert of Set user agent type of transient item the same as pending item. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.mm ('k') | ios/web/public/test/web_test_with_web_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/navigation_manager_impl_unittest.mm
diff --git a/ios/web/navigation/navigation_manager_impl_unittest.mm b/ios/web/navigation/navigation_manager_impl_unittest.mm
index e76db99192d2912aafecfb67b37ddda957f3c90b..b777003c5ee6800c2f48b796683fbddd31749cb1 100644
--- a/ios/web/navigation/navigation_manager_impl_unittest.mm
+++ b/ios/web/navigation/navigation_manager_impl_unittest.mm
@@ -681,44 +681,6 @@
EXPECT_EQ(item2->GetUserAgentType(), item3->GetUserAgentType());
}
-// Tests that adding transient item for a pending item with mobile user agent
-// type results in a transient item with mobile user agent type.
-TEST_F(NavigationManagerTest, AddTransientItemForMobilePendingItem) {
- navigation_manager()->AddPendingItem(
- GURL("http://www.url.com"), Referrer(), ui::PAGE_TRANSITION_TYPED,
- web::NavigationInitiationType::USER_INITIATED,
- web::NavigationManager::UserAgentOverrideOption::INHERIT);
- ASSERT_TRUE(navigation_manager()->GetPendingItem());
- navigation_manager()->GetPendingItem()->SetUserAgentType(
- UserAgentType::MOBILE);
-
- navigation_manager()->AddTransientItem(GURL("http://www.url.com"));
- ASSERT_TRUE(navigation_manager()->GetTransientItem());
- EXPECT_EQ(UserAgentType::MOBILE,
- navigation_manager()->GetTransientItem()->GetUserAgentType());
- EXPECT_EQ(UserAgentType::MOBILE,
- navigation_manager()->GetPendingItem()->GetUserAgentType());
-}
-
-// Tests that adding transient item for a pending item with desktop user agent
-// type results in a transient item with desktop user agent type.
-TEST_F(NavigationManagerTest, AddTransientItemForDesktopPendingItem) {
- navigation_manager()->AddPendingItem(
- GURL("http://www.url.com"), Referrer(), ui::PAGE_TRANSITION_TYPED,
- web::NavigationInitiationType::USER_INITIATED,
- web::NavigationManager::UserAgentOverrideOption::INHERIT);
- ASSERT_TRUE(navigation_manager()->GetPendingItem());
- navigation_manager()->GetPendingItem()->SetUserAgentType(
- UserAgentType::DESKTOP);
-
- navigation_manager()->AddTransientItem(GURL("http://www.url.com"));
- ASSERT_TRUE(navigation_manager()->GetTransientItem());
- EXPECT_EQ(UserAgentType::DESKTOP,
- navigation_manager()->GetTransientItem()->GetUserAgentType());
- EXPECT_EQ(UserAgentType::DESKTOP,
- navigation_manager()->GetPendingItem()->GetUserAgentType());
-}
-
// Tests that calling |Reload| with web::ReloadType::NORMAL is no-op when there
// are no transient, pending and committed items.
TEST_F(NavigationManagerTest, ReloadEmptyWithNormalType) {
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.mm ('k') | ios/web/public/test/web_test_with_web_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698