OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 5021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5032 TEST_F(NavigationControllerTest, PushStateUpdatesTitleAndFavicon) { | 5032 TEST_F(NavigationControllerTest, PushStateUpdatesTitleAndFavicon) { |
5033 // Navigate. | 5033 // Navigate. |
5034 main_test_rfh()->NavigateAndCommitRendererInitiated( | 5034 main_test_rfh()->NavigateAndCommitRendererInitiated( |
5035 1, true, GURL("http://foo")); | 5035 1, true, GURL("http://foo")); |
5036 | 5036 |
5037 // Set title and favicon. | 5037 // Set title and favicon. |
5038 base::string16 title(base::ASCIIToUTF16("Title")); | 5038 base::string16 title(base::ASCIIToUTF16("Title")); |
5039 FaviconStatus favicon; | 5039 FaviconStatus favicon; |
5040 favicon.valid = true; | 5040 favicon.valid = true; |
5041 favicon.url = GURL("http://foo/favicon.ico"); | 5041 favicon.url = GURL("http://foo/favicon.ico"); |
5042 controller().GetLastCommittedEntry()->SetTitle(title); | 5042 contents()->UpdateTitleForEntry( |
| 5043 controller().GetLastCommittedEntry(), title); |
5043 controller().GetLastCommittedEntry()->GetFavicon() = favicon; | 5044 controller().GetLastCommittedEntry()->GetFavicon() = favicon; |
5044 | 5045 |
5045 // history.pushState() is called. | 5046 // history.pushState() is called. |
5046 FrameHostMsg_DidCommitProvisionalLoad_Params params; | 5047 FrameHostMsg_DidCommitProvisionalLoad_Params params; |
5047 GURL kUrl2("http://foo#foo"); | 5048 GURL kUrl2("http://foo#foo"); |
5048 params.page_id = 2; | 5049 params.page_id = 2; |
5049 params.nav_entry_id = 0; | 5050 params.nav_entry_id = 0; |
5050 params.did_create_new_entry = true; | 5051 params.did_create_new_entry = true; |
5051 params.url = kUrl2; | 5052 params.url = kUrl2; |
5052 params.page_state = PageState::CreateFromURL(kUrl2); | 5053 params.page_state = PageState::CreateFromURL(kUrl2); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5334 observer.details().ssl_status.num_unknown_scts); | 5335 observer.details().ssl_status.num_unknown_scts); |
5335 EXPECT_EQ(default_ssl_status.num_invalid_scts, | 5336 EXPECT_EQ(default_ssl_status.num_invalid_scts, |
5336 observer.details().ssl_status.num_invalid_scts); | 5337 observer.details().ssl_status.num_invalid_scts); |
5337 EXPECT_EQ(default_ssl_status.num_valid_scts, | 5338 EXPECT_EQ(default_ssl_status.num_valid_scts, |
5338 observer.details().ssl_status.num_valid_scts); | 5339 observer.details().ssl_status.num_valid_scts); |
5339 | 5340 |
5340 EXPECT_EQ(1, main_test_rfh()->GetProcess()->bad_msg_count()); | 5341 EXPECT_EQ(1, main_test_rfh()->GetProcess()->bad_msg_count()); |
5341 } | 5342 } |
5342 | 5343 |
5343 } // namespace content | 5344 } // namespace content |
OLD | NEW |