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

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

Issue 2724383003: Removed -[CRWWebDelegate webDidStartLoadingURL:updateHistory:]. (Closed)
Patch Set: Fixed ios_web_unittests 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/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_impl_unittest.mm
diff --git a/ios/web/web_state/web_state_impl_unittest.mm b/ios/web/web_state/web_state_impl_unittest.mm
index 4771d0a7ca1bb10a1bd55633f4501b63e9f99cab..b2a16a2dc16ba547009c694f2d5c4fdc693ad048 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -212,10 +212,11 @@ TEST_F(WebStateImplTest, ResponseHeaders) {
web_state_->OnHttpResponseHeadersReceived(real_headers.get(), real_url);
web_state_->OnHttpResponseHeadersReceived(frame_headers.get(), frame_url);
// Include a hash to be sure it's handled correctly.
- web_state_->OnNavigationCommitted(
+ web_state_->UpdateHttpResponseHeaders(
GURL(real_url.spec() + std::string("#baz")));
// Verify that the right header set was kept.
+ ASSERT_TRUE(web_state_->GetHttpResponseHeaders());
EXPECT_TRUE(
web_state_->GetHttpResponseHeaders()->HasHeader("X-Should-Be-Here"));
EXPECT_FALSE(
@@ -239,14 +240,15 @@ TEST_F(WebStateImplTest, ResponseHeaderClearing) {
EXPECT_EQ(NULL, web_state_->GetHttpResponseHeaders());
// There should be headers and parsed values after loading.
- web_state_->OnNavigationCommitted(url);
+ web_state_->UpdateHttpResponseHeaders(url);
+ ASSERT_TRUE(web_state_->GetHttpResponseHeaders());
EXPECT_TRUE(web_state_->GetHttpResponseHeaders()->HasHeader("Content-Type"));
EXPECT_NE("", web_state_->GetContentsMimeType());
EXPECT_NE("", web_state_->GetContentLanguageHeader());
// ... but not after loading another page, nor should there be specific
// parsed values.
- web_state_->OnNavigationCommitted(GURL("http://elsewhere.com/"));
+ web_state_->UpdateHttpResponseHeaders(GURL("http://elsewhere.com/"));
EXPECT_EQ(NULL, web_state_->GetHttpResponseHeaders());
EXPECT_EQ("", web_state_->GetContentsMimeType());
EXPECT_EQ("", web_state_->GetContentLanguageHeader());
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698