Index: chrome/browser/autofill/autofill_interactive_uitest.cc |
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc |
index c871a26a9163f9f36492c8908bbea11a4b7f141f..379b449bb9be40c8fda557f0bed00585ade666a5 100644 |
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc |
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc |
@@ -30,6 +30,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_manager.h" |
#include "components/autofill/core/browser/autofill_manager_test_delegate.h" |
#include "components/autofill/core/browser/autofill_profile.h" |
@@ -210,7 +211,8 @@ class AutofillInteractiveTest : public InProcessBrowserTest { |
// Inject the test delegate into the AutofillManager. |
content::WebContents* web_contents = GetWebContents(); |
ContentAutofillDriver* autofill_driver = |
- ContentAutofillDriver::FromWebContents(web_contents); |
+ ContentAutofillDriverFactory::FromWebContents(web_contents) |
+ ->DriverForFrame(web_contents->GetMainFrame()); |
AutofillManager* autofill_manager = autofill_driver->autofill_manager(); |
autofill_manager->SetTestDelegate(&test_delegate_); |
@@ -225,8 +227,10 @@ class AutofillInteractiveTest : public InProcessBrowserTest { |
void TearDownOnMainThread() override { |
// Make sure to close any showing popups prior to tearing down the UI. |
content::WebContents* web_contents = GetWebContents(); |
- 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(); |
} |