Chromium Code Reviews| 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: |