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

Side by Side Diff: chrome/browser/webdata/web_data_service_unittest.cc

Issue 13191007: Pass app_locale directly to AutofillTable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome frame tests fix Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 : ui_thread_(BrowserThread::UI, &message_loop_), 63 : ui_thread_(BrowserThread::UI, &message_loop_),
64 db_thread_(BrowserThread::DB) {} 64 db_thread_(BrowserThread::DB) {}
65 65
66 protected: 66 protected:
67 virtual void SetUp() { 67 virtual void SetUp() {
68 db_thread_.Start(); 68 db_thread_.Start();
69 69
70 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 70 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
71 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); 71 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB");
72 72
73 wdbs_ = new WebDatabaseService(path, AutofillCountry::ApplicationLocale()); 73 wdbs_ = new WebDatabaseService(path);
74 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new AutofillTable())); 74 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new AutofillTable()));
75 wdbs_->LoadDatabase(WebDatabaseService::InitCallback()); 75 wdbs_->LoadDatabase(WebDatabaseService::InitCallback());
76 76
77 wds_ = new AutofillWebDataService( 77 wds_ = new AutofillWebDataService(
78 wdbs_, WebDataServiceBase::ProfileErrorCallback()); 78 wdbs_, WebDataServiceBase::ProfileErrorCallback());
79 wds_->Init(); 79 wds_->Init();
80 } 80 }
81 81
82 virtual void TearDown() { 82 virtual void TearDown() {
83 wds_->ShutdownOnUIThread(); 83 wds_->ShutdownOnUIThread();
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 EXPECT_EQ(handle2, profile_consumer2.handle()); 523 EXPECT_EQ(handle2, profile_consumer2.handle());
524 ASSERT_EQ(0U, profile_consumer2.result().size()); 524 ASSERT_EQ(0U, profile_consumer2.result().size());
525 525
526 // Check that the credit card was removed. 526 // Check that the credit card was removed.
527 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; 527 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2;
528 handle2 = wds_->GetCreditCards(&card_consumer2); 528 handle2 = wds_->GetCreditCards(&card_consumer2);
529 MessageLoop::current()->Run(); 529 MessageLoop::current()->Run();
530 EXPECT_EQ(handle2, card_consumer2.handle()); 530 EXPECT_EQ(handle2, card_consumer2.handle());
531 ASSERT_EQ(0U, card_consumer2.result().size()); 531 ASSERT_EQ(0U, card_consumer2.result().size());
532 } 532 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service_factory.cc ('k') | chrome/browser/webdata/web_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698