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

Unified Diff: chrome/browser/ui/autofill/generated_credit_card_bubble_controller_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: intended Created 5 years, 8 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/ui/autofill/generated_credit_card_bubble_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc
index 7454e2a1eceb43f430f23ca0cb05ecc7a7b95496..540224c0a2b6f9c649fc1ba2eb17c5d41f82eba5 100644
--- a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc
@@ -15,6 +15,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
+#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
@@ -76,9 +78,19 @@ class GeneratedCreditCardBubbleControllerTest : public testing::Test {
BackingCard());
}
- void NavigateWithTransition(ui::PageTransition trans) {
- content::WebContentsTester::For(test_web_contents_.get())->TestDidNavigate(
- test_web_contents_->GetMainFrame(), 1, GURL("about:blank"), trans);
+ void NavigateWithTransition(ui::PageTransition transition) {
+ content::LoadCommittedDetails details;
+ content::FrameNavigateParams params;
+
+ // The transition is in two places; quite a bummer.
Ilya Sherman 2015/04/24 21:34:08 nit: I feel your pain, but I'm not sure this comme
Avi (use Gerrit) 2015/04/24 21:37:16 Done.
+ scoped_ptr<content::NavigationEntry> navigation_entry(
+ content::NavigationEntry::Create());
+ navigation_entry->SetTransitionType(transition);
+ params.transition = transition;
+ details.entry = navigation_entry.get();
+
+ ASSERT_NE(nullptr, controller());
+ controller()->DidNavigateMainFrame(details, params);
}
private:

Powered by Google App Engine
This is Rietveld 408576698