Index: chrome/browser/autofill/autofill_browsertest.cc |
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc |
index eb385e97c9520f678d4ee9e81fee4e503f0cbd68..1eb2d13bfa5d84f9afffb60ce1675e5a971fe83a 100644 |
--- a/chrome/browser/autofill/autofill_browsertest.cc |
+++ b/chrome/browser/autofill/autofill_browsertest.cc |
@@ -26,6 +26,7 @@ |
#include "chrome/test/base/test_switches.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "components/autofill/content/browser/content_autofill_driver.h" |
+#include "components/autofill/content/browser/content_autofill_driver_factory.h" |
#include "components/autofill/core/browser/autofill_profile.h" |
#include "components/autofill/core/browser/autofill_test_utils.h" |
#include "components/autofill/core/browser/credit_card.h" |
@@ -123,8 +124,10 @@ class AutofillTest : public InProcessBrowserTest { |
// Make sure to close any showing popups prior to tearing down the UI. |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
- AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( |
- web_contents)->autofill_manager(); |
+ AutofillManager* autofill_manager = |
+ ContentAutofillDriverFactory::FromWebContents(web_contents) |
+ ->DriverForFrame(web_contents->GetMainFrame()) |
+ ->autofill_manager(); |
autofill_manager->client()->HideAutofillPopup(); |
} |