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

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

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to fix conflict Created 7 years, 6 months 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 12032ecd45188935ab509a2b7757f1b8b174ae24..e4491abbf96b6306ec718e8ca661c1257743dd84 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -14,6 +14,7 @@
#include "components/autofill/browser/autofill_manager.h"
#include "components/autofill/browser/data_driven_test.h"
#include "components/autofill/browser/form_structure.h"
+#include "components/autofill/content/browser/autofill_driver_impl.h"
#include "googleurl/src/gurl.h"
namespace autofill {
@@ -59,8 +60,10 @@ void FormStructureBrowserTest::GenerateResults(const std::string& input,
ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(),
HTMLToDataURI(input)));
- AutofillManager* autofill_manager = AutofillManager::FromWebContents(
+ AutofillDriverImpl* autofill_driver = AutofillDriverImpl::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
+ ASSERT_NE(static_cast<AutofillDriverImpl*>(NULL), autofill_driver);
+ AutofillManager* autofill_manager = autofill_driver->autofill_manager();
ASSERT_NE(static_cast<AutofillManager*>(NULL), autofill_manager);
std::vector<FormStructure*> forms = autofill_manager->form_structures_.get();
*output = FormStructureBrowserTest::FormStructuresToString(forms);

Powered by Google App Engine
This is Rietveld 408576698