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

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

Issue 2845913003: Cleaned up unused methods from WebStateImpl and NavigationContextImpl. (Closed)
Patch Set: Fixed tests 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 9ffedf9a4cd2ff624f9f41146897e63ec5fe4701..b58770a06b7a8d9dc2f8a7c5510b86be8aef5f38 100644
--- a/ios/web/web_state/navigation_context_impl_unittest.mm
+++ b/ios/web/web_state/navigation_context_impl_unittest.mm
@@ -30,20 +30,6 @@ class NavigationContextImplTest : public PlatformTest {
scoped_refptr<net::HttpResponseHeaders> response_headers_;
};
-// Tests legacy CreateNavigationContext factory method.
-TEST_F(NavigationContextImplTest, LegacyNavigationContext) {
- std::unique_ptr<NavigationContext> context =
- NavigationContextImpl::CreateNavigationContext(&web_state_, url_,
- response_headers_);
- ASSERT_TRUE(context);
-
- EXPECT_EQ(&web_state_, context->GetWebState());
- EXPECT_EQ(url_, context->GetUrl());
- EXPECT_FALSE(context->IsSameDocument());
- EXPECT_FALSE(context->IsErrorPage());
- EXPECT_EQ(response_headers_.get(), context->GetResponseHeaders());
-}
-
// Tests CreateNavigationContext factory method.
TEST_F(NavigationContextImplTest, NavigationContext) {
std::unique_ptr<NavigationContext> context =
@@ -57,34 +43,6 @@ TEST_F(NavigationContextImplTest, NavigationContext) {
EXPECT_FALSE(context->GetResponseHeaders());
}
-// Tests CreateSameDocumentNavigationContext factory method.
-TEST_F(NavigationContextImplTest, SameDocumentNavigationContext) {
- std::unique_ptr<NavigationContext> context =
- NavigationContextImpl::CreateSameDocumentNavigationContext(&web_state_,
- url_);
- ASSERT_TRUE(context);
-
- EXPECT_EQ(&web_state_, context->GetWebState());
- EXPECT_EQ(url_, context->GetUrl());
- EXPECT_TRUE(context->IsSameDocument());
- EXPECT_FALSE(context->IsErrorPage());
- EXPECT_FALSE(context->GetResponseHeaders());
-}
-
-// Tests CreateErrorPageNavigationContext factory method.
-TEST_F(NavigationContextImplTest, ErrorPageNavigationContext) {
- std::unique_ptr<NavigationContext> context =
- NavigationContextImpl::CreateErrorPageNavigationContext(
- &web_state_, url_, response_headers_);
- ASSERT_TRUE(context);
-
- EXPECT_EQ(&web_state_, context->GetWebState());
- EXPECT_EQ(url_, context->GetUrl());
- EXPECT_FALSE(context->IsSameDocument());
- EXPECT_TRUE(context->IsErrorPage());
- EXPECT_EQ(response_headers_.get(), context->GetResponseHeaders());
-}
-
// Tests NavigationContextImpl Setters.
TEST_F(NavigationContextImplTest, Setters) {
std::unique_ptr<NavigationContextImpl> context =
« 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