OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 void BlockForDBThread() { | 214 void BlockForDBThread() { |
215 base::RunLoop run_loop; | 215 base::RunLoop run_loop; |
216 ASSERT_TRUE(BrowserThread::PostTaskAndReply(BrowserThread::DB, FROM_HERE, | 216 ASSERT_TRUE(BrowserThread::PostTaskAndReply(BrowserThread::DB, FROM_HERE, |
217 base::Bind(&base::DoNothing), run_loop.QuitClosure())); | 217 base::Bind(&base::DoNothing), run_loop.QuitClosure())); |
218 run_loop.Run(); | 218 run_loop.Run(); |
219 } | 219 } |
220 | 220 |
221 protected: | 221 protected: |
222 base::WeakPtrFactory<SyncAutofillDataTypeControllerTest> weak_ptr_factory_; | 222 base::WeakPtrFactory<SyncAutofillDataTypeControllerTest> weak_ptr_factory_; |
223 MessageLoopForUI message_loop_; | 223 base::MessageLoopForUI message_loop_; |
224 content::TestBrowserThread ui_thread_; | 224 content::TestBrowserThread ui_thread_; |
225 content::TestBrowserThread db_thread_; | 225 content::TestBrowserThread db_thread_; |
226 | 226 |
227 scoped_refptr<NiceMock<SharedChangeProcessorMock> > change_processor_; | 227 scoped_refptr<NiceMock<SharedChangeProcessorMock> > change_processor_; |
228 ProfileSyncComponentsFactoryMock profile_sync_factory_; | 228 ProfileSyncComponentsFactoryMock profile_sync_factory_; |
229 ProfileSyncServiceMock service_; | 229 ProfileSyncServiceMock service_; |
230 ProfileMock profile_; | 230 ProfileMock profile_; |
231 scoped_refptr<AutofillDataTypeController> autofill_dtc_; | 231 scoped_refptr<AutofillDataTypeController> autofill_dtc_; |
232 | 232 |
233 // Stores arguments of most recent call of OnStartFinished(). | 233 // Stores arguments of most recent call of OnStartFinished(). |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 base::Bind(&SyncAutofillDataTypeControllerTest::OnStartFinished, | 315 base::Bind(&SyncAutofillDataTypeControllerTest::OnStartFinished, |
316 weak_ptr_factory_.GetWeakPtr())); | 316 weak_ptr_factory_.GetWeakPtr())); |
317 BlockForDBThread(); | 317 BlockForDBThread(); |
318 | 318 |
319 EXPECT_TRUE(web_db->CheckAutofillCullingValue()); | 319 EXPECT_TRUE(web_db->CheckAutofillCullingValue()); |
320 } | 320 } |
321 | 321 |
322 } // namespace | 322 } // namespace |
323 | 323 |
324 } // namespace browser_sync | 324 } // namespace browser_sync |
OLD | NEW |