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

Unified Diff: content/browser/devtools/devtools_manager_unittest.cc

Issue 1002803002: Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relax the dcheck Created 5 years, 7 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/devtools/devtools_manager_unittest.cc
diff --git a/content/browser/devtools/devtools_manager_unittest.cc b/content/browser/devtools/devtools_manager_unittest.cc
index 0e0ba3fd7ca4f19bff40ce20a17e3429b5c50ee5..cd632c1aecadd28671d309ed8dda99aa0afb87de 100644
--- a/content/browser/devtools/devtools_manager_unittest.cc
+++ b/content/browser/devtools/devtools_manager_unittest.cc
@@ -167,9 +167,10 @@ TEST_F(DevToolsManagerTest, ReattachOnCancelPendingNavigation) {
const GURL url("http://www.google.com");
controller().LoadURL(
url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
+ int pending_id = controller().GetPendingEntry()->GetUniqueID();
contents()->GetMainFrame()->PrepareForCommit();
- contents()->TestDidNavigate(
- contents()->GetMainFrame(), 1, url, ui::PAGE_TRANSITION_TYPED);
+ contents()->TestDidNavigate(contents()->GetMainFrame(), 1, pending_id, true,
+ url, ui::PAGE_TRANSITION_TYPED);
EXPECT_FALSE(contents()->CrossProcessNavigationPending());
TestDevToolsClientHost client_host;
@@ -188,9 +189,10 @@ TEST_F(DevToolsManagerTest, ReattachOnCancelPendingNavigation) {
// Interrupt pending navigation and navigate back to the original site.
controller().LoadURL(
url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
+ pending_id = controller().GetPendingEntry()->GetUniqueID();
contents()->GetMainFrame()->PrepareForCommit();
- contents()->TestDidNavigate(
- contents()->GetMainFrame(), 1, url, ui::PAGE_TRANSITION_TYPED);
+ contents()->TestDidNavigate(contents()->GetMainFrame(), 1, pending_id, false,
+ url, ui::PAGE_TRANSITION_TYPED);
EXPECT_FALSE(contents()->CrossProcessNavigationPending());
EXPECT_EQ(client_host.agent_host(),
DevToolsAgentHost::GetOrCreateFor(web_contents()).get());

Powered by Google App Engine
This is Rietveld 408576698