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..41f39509e19ea0414a6b132f9e01588825733cd4 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; fill in both. |
+ 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: |