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

Unified Diff: ios/web/web_state/navigation_context_impl_unittest.mm

Issue 2903883002: Added NavigationContext::IsPost. (Closed)
Patch Set: Self review Created 3 years, 7 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/navigation_context_impl.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/navigation_context_impl_unittest.mm
diff --git a/ios/web/web_state/navigation_context_impl_unittest.mm b/ios/web/web_state/navigation_context_impl_unittest.mm
index 9729d51ea8cdf746f34c07253ddae245f0bc1e84..7358b8ff287c8b31ad4725db19c55d290911d545 100644
--- a/ios/web/web_state/navigation_context_impl_unittest.mm
+++ b/ios/web/web_state/navigation_context_impl_unittest.mm
@@ -55,12 +55,21 @@ TEST_F(NavigationContextImplTest, Setters) {
ASSERT_TRUE(context);
ASSERT_FALSE(context->IsSameDocument());
+ ASSERT_FALSE(context->IsPost());
ASSERT_FALSE(context->GetError());
ASSERT_NE(response_headers_.get(), context->GetResponseHeaders());
// SetSameDocument
context->SetIsSameDocument(true);
EXPECT_TRUE(context->IsSameDocument());
+ ASSERT_FALSE(context->IsPost());
+ EXPECT_FALSE(context->GetError());
+ EXPECT_NE(response_headers_.get(), context->GetResponseHeaders());
+
+ // SetPost
+ context->SetIsPost(true);
+ EXPECT_TRUE(context->IsSameDocument());
+ ASSERT_TRUE(context->IsPost());
EXPECT_FALSE(context->GetError());
EXPECT_NE(response_headers_.get(), context->GetResponseHeaders());
@@ -68,12 +77,14 @@ TEST_F(NavigationContextImplTest, Setters) {
NSError* error = [[[NSError alloc] init] autorelease];
context->SetError(error);
EXPECT_TRUE(context->IsSameDocument());
+ ASSERT_TRUE(context->IsPost());
EXPECT_EQ(error, context->GetError());
EXPECT_NE(response_headers_.get(), context->GetResponseHeaders());
// SetResponseHeaders
context->SetResponseHeaders(response_headers_);
EXPECT_TRUE(context->IsSameDocument());
+ ASSERT_TRUE(context->IsPost());
EXPECT_EQ(error, context->GetError());
EXPECT_EQ(response_headers_.get(), context->GetResponseHeaders());
}
« no previous file with comments | « ios/web/web_state/navigation_context_impl.mm ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698