diff options
author | benquan@chromium.org <benquan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 01:06:23 +0000 |
---|---|---|
committer | benquan@chromium.org <benquan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 01:06:23 +0000 |
commit | 685d497857e390dbdb203e2fdf6ad9b9f4484e37 (patch) | |
tree | da5c7eb45c07791965aef9518ffa5a790590f454 /chrome/browser/autofill/autofill_metrics_unittest.cc | |
parent | 7b7867d37c6bd2d259adfffbddb39e9d9b3af66e (diff) | |
download | chromium_src-685d497857e390dbdb203e2fdf6ad9b9f4484e37.zip chromium_src-685d497857e390dbdb203e2fdf6ad9b9f4484e37.tar.gz chromium_src-685d497857e390dbdb203e2fdf6ad9b9f4484e37.tar.bz2 |
Download autocheckout whitelist and enable autocheckout for whitelisted sites only.
BUG=170945
Review URL: https://chromiumcodereview.appspot.com/11867025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_metrics_unittest.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_metrics_unittest.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc index 36747ea..e7744a7 100644 --- a/chrome/browser/autofill/autofill_metrics_unittest.cc +++ b/chrome/browser/autofill/autofill_metrics_unittest.cc @@ -148,7 +148,8 @@ class TestPersonalDataManager : public PersonalDataManager { class TestFormStructure : public FormStructure { public: - explicit TestFormStructure(const FormData& form) : FormStructure(form) {} + explicit TestFormStructure(const FormData& form) + : FormStructure(form, std::string()) {} virtual ~TestFormStructure() {} void SetFieldTypes(const std::vector<AutofillFieldType>& heuristic_types, @@ -300,6 +301,7 @@ class AutofillMetricsTest : public ChromeRenderViewHostTestHarness { content::TestBrowserThread ui_thread_; content::TestBrowserThread file_thread_; + content::TestBrowserThread io_thread_; scoped_refptr<TestAutofillManager> autofill_manager_; TestAutocheckoutManager autocheckout_manager_; @@ -315,6 +317,7 @@ AutofillMetricsTest::AutofillMetricsTest() : ChromeRenderViewHostTestHarness(), ui_thread_(BrowserThread::UI, &message_loop_), file_thread_(BrowserThread::FILE), + io_thread_(BrowserThread::IO), autocheckout_manager_(NULL) { } @@ -325,11 +328,13 @@ AutofillMetricsTest::~AutofillMetricsTest() { } void AutofillMetricsTest::SetUp() { - Profile* profile = new TestingProfile(); + TestingProfile* profile = new TestingProfile(); + profile->CreateRequestContext(); browser_context_.reset(profile); PersonalDataManagerFactory::GetInstance()->SetTestingFactory(profile, NULL); ChromeRenderViewHostTestHarness::SetUp(); + io_thread_.StartIOThread(); TabAutofillManagerDelegate::CreateForWebContents(web_contents()); personal_data_.SetBrowserContext(profile); autofill_manager_ = new TestAutofillManager( @@ -358,8 +363,10 @@ void AutofillMetricsTest::TearDown() { // AutofillManager is tied to the lifetime of the WebContents, so it must // be destroyed at the destruction of the WebContents. autofill_manager_ = NULL; + profile()->ResetRequestContext(); file_thread_.Stop(); ChromeRenderViewHostTestHarness::TearDown(); + io_thread_.Stop(); } scoped_ptr<ConfirmInfoBarDelegate> AutofillMetricsTest::CreateDelegate( |