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

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

Issue 12957002: wd4-ui for try only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wd4-ui_with_windows_fix Created 7 years, 9 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public: 69 public:
70 WebDataServiceTest() 70 WebDataServiceTest()
71 : ui_thread_(BrowserThread::UI, &message_loop_), 71 : ui_thread_(BrowserThread::UI, &message_loop_),
72 db_thread_(BrowserThread::DB) {} 72 db_thread_(BrowserThread::DB) {}
73 73
74 protected: 74 protected:
75 virtual void SetUp() { 75 virtual void SetUp() {
76 db_thread_.Start(); 76 db_thread_.Start();
77 77
78 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 78 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
79 wds_ = new WebDataService(); 79 wds_ = new WebDataService(WebDataServiceBase::ProfileErrorCallback());
80 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); 80 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB");
81 wds_->Init(path); 81 wds_->Init(path);
82 } 82 }
83 83
84 virtual void TearDown() { 84 virtual void TearDown() {
85 wds_->ShutdownOnUIThread(); 85 wds_->ShutdownOnUIThread();
86 wds_ = NULL; 86 wds_ = NULL;
87 WaitForDatabaseThread(); 87 WaitForDatabaseThread();
88 88
89 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); 89 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 EXPECT_EQ(handle2, profile_consumer2.handle()); 540 EXPECT_EQ(handle2, profile_consumer2.handle());
541 ASSERT_EQ(0U, profile_consumer2.result().size()); 541 ASSERT_EQ(0U, profile_consumer2.result().size());
542 542
543 // Check that the credit card was removed. 543 // Check that the credit card was removed.
544 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; 544 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2;
545 handle2 = wds_->GetCreditCards(&card_consumer2); 545 handle2 = wds_->GetCreditCards(&card_consumer2);
546 MessageLoop::current()->Run(); 546 MessageLoop::current()->Run();
547 EXPECT_EQ(handle2, card_consumer2.handle()); 547 EXPECT_EQ(handle2, card_consumer2.handle());
548 ASSERT_EQ(0U, card_consumer2.result().size()); 548 ASSERT_EQ(0U, card_consumer2.result().size());
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service_test_util.cc ('k') | chrome/browser/webdata/web_data_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698