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

Unified Diff: chrome/browser/translate/translate_manager_render_view_host_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: chrome/browser/translate/translate_manager_render_view_host_unittest.cc
diff --git a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
index 7772956bdc8f189c49db51028476afc0b87088ec..4eb0792a800841b32aa1997835d8b0162ee5cf63 100644
--- a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
+++ b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
@@ -840,8 +840,11 @@ TEST_F(TranslateManagerRenderViewHostTest, ReloadFromLocationBar) {
NavEntryCommittedObserver nav_observer(web_contents());
web_contents()->GetController().LoadURL(
url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
+ int pending_id =
+ web_contents()->GetController().GetPendingEntry()->GetUniqueID();
content::RenderFrameHostTester::For(web_contents()->GetMainFrame())
- ->SendNavigateWithTransition(0, url, ui::PAGE_TRANSITION_TYPED);
+ ->SendNavigateWithTransition(0, pending_id, false, url,
+ ui::PAGE_TRANSITION_TYPED);
// Test that we are really getting a same page navigation, the test would be
// useless if it was not the case.
@@ -894,12 +897,12 @@ TEST_F(TranslateManagerRenderViewHostTest, CloseInfoBarInSubframeNavigation) {
// Simulate a sub-frame auto-navigating.
subframe_tester->SendNavigateWithTransition(
- 0, GURL("http://pub.com"), ui::PAGE_TRANSITION_AUTO_SUBFRAME);
+ 0, 0, false, GURL("http://pub.com"), ui::PAGE_TRANSITION_AUTO_SUBFRAME);
EXPECT_TRUE(GetTranslateInfoBar() == NULL);
// Simulate the user navigating in a sub-frame.
subframe_tester->SendNavigateWithTransition(
- 1, GURL("http://pub.com"), ui::PAGE_TRANSITION_MANUAL_SUBFRAME);
+ 1, 0, true, GURL("http://pub.com"), ui::PAGE_TRANSITION_MANUAL_SUBFRAME);
EXPECT_TRUE(GetTranslateInfoBar() == NULL);
// Navigate out of page, a new infobar should show.

Powered by Google App Engine
This is Rietveld 408576698