| Index: content/browser/web_contents/web_contents_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| index 2c98ee2968aed1080eed594cf25910550c8a967e..d5ac7057c18ae9629a2c0be6e9d7e3ccdd96e547 100644
|
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc
|
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| @@ -314,6 +314,26 @@ TEST_F(WebContentsImplTest, UpdateTitle) {
|
| EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle());
|
| }
|
|
|
| +TEST_F(WebContentsImplTest, DontUseTitleFromPendingEntry) {
|
| + const GURL kGURL("chrome://blah");
|
| + controller().LoadURL(
|
| + kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string());
|
| + EXPECT_EQ(string16(), contents()->GetTitle());
|
| +}
|
| +
|
| +TEST_F(WebContentsImplTest, UseTitleFromPendingEntryIfSet) {
|
| + const GURL kGURL("chrome://blah");
|
| + const string16 title = ASCIIToUTF16("My Title");
|
| + controller().LoadURL(
|
| + kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string());
|
| +
|
| + NavigationEntry* entry = controller().GetVisibleEntry();
|
| + ASSERT_EQ(kGURL, entry->GetURL());
|
| + entry->SetTitle(title);
|
| +
|
| + EXPECT_EQ(title, contents()->GetTitle());
|
| +}
|
| +
|
| // Test view source mode for a webui page.
|
| TEST_F(WebContentsImplTest, NTPViewSource) {
|
| NavigationControllerImpl& cont =
|
|
|