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

Unified Diff: chrome/browser/autofill/form_structure_browsertest.cc

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FirstUserGesture Created 6 years, 1 month 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/autofill/form_structure_browsertest.cc
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index 88f979927816f712a7774f6a77bdf8173470cec9..6ac8ec4340681b9fe08e0f44fdccb2b0fb0ef586 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -14,6 +14,7 @@
#include "chrome/test/base/in_process_browser_test.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/data_driven_test.h"
#include "components/autofill/core/browser/form_structure.h"
@@ -69,9 +70,11 @@ void FormStructureBrowserTest::GenerateResults(const std::string& input,
ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(),
HTMLToDataURI(input)));
+ content::WebContents* web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
ContentAutofillDriver* autofill_driver =
- ContentAutofillDriver::FromWebContents(
- browser()->tab_strip_model()->GetActiveWebContents());
+ ContentAutofillDriverFactory::FromWebContents(web_contents)
+ ->DriverForFrame(web_contents->GetMainFrame());
ASSERT_NE(static_cast<ContentAutofillDriver*>(NULL), autofill_driver);
AutofillManager* autofill_manager = autofill_driver->autofill_manager();
ASSERT_NE(static_cast<AutofillManager*>(NULL), autofill_manager);

Powered by Google App Engine
This is Rietveld 408576698