OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/callback.h" | 5 #include "base/callback.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" |
11 #include "chrome/browser/sync/glue/database_model_worker.h" | 11 #include "chrome/browser/sync/glue/database_model_worker.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 using base::OneShotTimer; | 14 using base::OneShotTimer; |
15 using base::Thread; | 15 using base::Thread; |
16 using base::TimeDelta; | 16 using base::TimeDelta; |
17 using browser_sync::DatabaseModelWorker; | 17 using browser_sync::DatabaseModelWorker; |
18 | 18 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 }; | 84 }; |
85 | 85 |
86 TEST_F(DatabaseModelWorkerTest, DoesWorkOnDatabaseThread) { | 86 TEST_F(DatabaseModelWorkerTest, DoesWorkOnDatabaseThread) { |
87 MessageLoop::current()->PostTask(FROM_HERE, factory()->NewRunnableMethod( | 87 MessageLoop::current()->PostTask(FROM_HERE, factory()->NewRunnableMethod( |
88 &DatabaseModelWorkerTest::ScheduleWork)); | 88 &DatabaseModelWorkerTest::ScheduleWork)); |
89 MessageLoop::current()->Run(); | 89 MessageLoop::current()->Run(); |
90 EXPECT_TRUE(did_do_work()); | 90 EXPECT_TRUE(did_do_work()); |
91 } | 91 } |
92 | 92 |
93 } // namespace | 93 } // namespace |
OLD | NEW |