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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7dabef2c4418b69bd157b570272a33405d0cf2aa..47a28b5717f40d7e5086c5768ea1bf07f3210000 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -1426,13 +1426,14 @@ TEST_F(WebContentsImplTest, CrossSiteNotPreemptedDuringBeforeUnload) {
TEST_F(WebContentsImplTest, NavigationEntryContentState) {
TestRenderFrameHost* orig_rfh = contents()->GetMainFrame();
- // Navigate to URL. There should be no committed entry yet.
+ // Navigate to URL. There should only be the initial entry so far.
const GURL url("http://www.google.com");
controller().LoadURL(
url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
int entry_id = controller().GetPendingEntry()->GetUniqueID();
+ EXPECT_TRUE(controller().IsInitialNavigation());
NavigationEntry* entry = controller().GetLastCommittedEntry();
- EXPECT_EQ(nullptr, entry);
+ EXPECT_EQ(GURL(url::kAboutBlankURL), entry->GetURL());
// Committed entry should have page state after DidNavigate.
orig_rfh->PrepareForCommit();
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698