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

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

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 10 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/crw_session_entry.mm ('k') | ios/web/navigation/navigation_item_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/crw_session_entry_unittest.mm
diff --git a/ios/web/navigation/crw_session_entry_unittest.mm b/ios/web/navigation/crw_session_entry_unittest.mm
index a5b932392390bdd31194fbc5619330b78f3f81d5..21a86e147c1e633d5cd2ef91d8e321e0d5d1452e 100644
--- a/ios/web/navigation/crw_session_entry_unittest.mm
+++ b/ios/web/navigation/crw_session_entry_unittest.mm
@@ -40,6 +40,7 @@ void SetUp() override {
item->SetTransitionType(transition);
item->SetTimestamp(base::Time::Now());
item->SetPostData([@"Test data" dataUsingEncoding:NSUTF8StringEncoding]);
+ item->SetUserAgentType(web::UserAgentType::MOBILE);
session_entry_.reset(
[[CRWSessionEntry alloc] initWithNavigationItem:std::move(item)]);
}
@@ -62,8 +63,7 @@ void SetUp() override {
EXPECT_EQ(navItem1->GetPageDisplayState(), navItem2->GetPageDisplayState());
EXPECT_EQ(navItem1->ShouldSkipRepostFormConfirmation(),
navItem2->ShouldSkipRepostFormConfirmation());
- EXPECT_EQ(navItem1->IsOverridingUserAgent(),
- navItem2->IsOverridingUserAgent());
+ EXPECT_EQ(navItem1->GetUserAgentType(), navItem2->GetUserAgentType());
EXPECT_TRUE((!navItem1->HasPostData() && !navItem2->HasPostData()) ||
[navItem1->GetPostData() isEqualToData:navItem2->GetPostData()]);
EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs(
@@ -77,7 +77,8 @@ void SetUp() override {
EXPECT_NSEQ([session_entry_ description],
@"url:http://init.test/ originalurl:http://init.test/ "
@"title:Title transition:2 displayState:{ scrollOffset:(nan, "
- @"nan), zoomScaleRange:(nan, nan), zoomScale:nan } desktopUA:0");
+ @"nan), zoomScaleRange:(nan, nan), zoomScale:nan } "
+ @"userAgentType:MOBILE");
}
TEST_F(CRWSessionEntryTest, EmptyVirtualUrl) {
« no previous file with comments | « ios/web/navigation/crw_session_entry.mm ('k') | ios/web/navigation/navigation_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698