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

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

Issue 11867025: Download autocheckout whitelist and enable autocheckout for whitelisted sites only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 7 years, 10 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
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_merge_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager_unittest.cc
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index 45f7ed0acaae5fff5dd7ad84805e2fbcdc1306bf..644a3ccce7159fb3257f438815610e3eb0efca9f 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -617,19 +617,22 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness {
AutofillManagerTest()
: ChromeRenderViewHostTestHarness(),
ui_thread_(BrowserThread::UI, &message_loop_),
- file_thread_(BrowserThread::FILE) {
+ file_thread_(BrowserThread::FILE),
+ io_thread_(BrowserThread::IO) {
}
virtual ~AutofillManagerTest() {
}
virtual void SetUp() OVERRIDE {
- Profile* profile = CreateProfile();
+ TestingProfile* profile = CreateProfile();
+ profile->CreateRequestContext();
browser_context_.reset(profile);
PersonalDataManagerFactory::GetInstance()->SetTestingFactory(
profile, TestPersonalDataManager::Build);
ChromeRenderViewHostTestHarness::SetUp();
+ io_thread_.StartIOThread();
TabAutofillManagerDelegate::CreateForWebContents(web_contents());
personal_data_.SetBrowserContext(profile);
autofill_manager_ = new TestAutofillManager(
@@ -648,6 +651,7 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness {
autofill_manager_ = NULL;
file_thread_.Stop();
ChromeRenderViewHostTestHarness::TearDown();
+ io_thread_.Stop();
}
virtual TestingProfile* CreateProfile() {
@@ -746,6 +750,7 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness {
protected:
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
+ content::TestBrowserThread io_thread_;
scoped_refptr<TestAutofillManager> autofill_manager_;
TestPersonalDataManager personal_data_;
@@ -773,7 +778,8 @@ class IncognitoAutofillManagerTest : public AutofillManagerTest {
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,
@@ -2638,7 +2644,7 @@ TEST_F(AutofillManagerTest, FormSubmittedWithDifferentFields) {
FormsSeen(forms);
// Cache the expected form signature.
- std::string signature = FormStructure(form).FormSignature();
+ std::string signature = FormStructure(form, std::string()).FormSignature();
// Change the structure of the form prior to submission.
// Websites would typically invoke JavaScript either on page load or on form
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_merge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698