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

Unified Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Very minor fix. Created 3 years, 11 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
Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index af3a4999865428e40593d9cde1d99fc5b55f3435..533082ca99dee4b76058245029e0121e6ed48e44 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -6166,10 +6166,23 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(cross_origin_url, web_contents->GetLastCommittedURL());
EXPECT_EQ(2, web_contents->GetController().GetLastCommittedEntryIndex());
+ if (IsBrowserSideNavigationEnabled()) {
+ // With browser-side-navigation, the history navigation is dropped.
nasko 2017/01/13 02:51:09 I thought the discussion we had concluded that we
arthursonzogni 2017/01/13 15:18:37 It's difficult to relaunch every navigations. I ha
nasko 2017/01/13 19:36:56 Why would you need to relaunch every navigation? I
clamy 2017/01/16 12:16:11 In order to properly resolve it as a different doc
+ // Verify the expected origin through JavaScript. It also has the additional
nasko 2017/01/13 02:51:09 This comment doesn't seem correct, as the code doe
arthursonzogni 2017/01/13 15:18:37 Done.
+ // verification of the process also being still alive.
+ std::string is_alive;
+ EXPECT_TRUE(ExecuteScriptAndExtractString(
+ web_contents, "domAutomationController.send('alive')", &is_alive));
+ EXPECT_EQ("alive", is_alive);
+ EXPECT_EQ(2, web_contents->GetController().GetLastCommittedEntryIndex());
+ EXPECT_EQ(3, web_contents->GetController().GetEntryCount());
+ return;
nasko 2017/01/13 02:51:09 Let's use an else block so it is more clear that t
arthursonzogni 2017/01/13 15:18:37 Done.
+ }
// Wait for the back navigation to commit as well.
history_commit_observer.Wait();
- EXPECT_EQ(start_url, web_contents->GetLastCommittedURL());
nasko 2017/01/13 02:51:09 Why drop this expectation?
arthursonzogni 2017/01/13 15:18:37 It's a mistake, thanks!
+
EXPECT_EQ(0, web_contents->GetController().GetLastCommittedEntryIndex());
+ EXPECT_EQ(3, web_contents->GetController().GetEntryCount());
// Verify the expected origin through JavaScript. It also has the additional
// verification of the process also being still alive.

Powered by Google App Engine
This is Rietveld 408576698