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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "base/timer.h" | 12 #include "base/timer.h" |
13 #include "chrome/browser/sync/glue/browser_thread_model_worker.h" | 13 #include "chrome/browser/sync/glue/browser_thread_model_worker.h" |
14 #include "content/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 using base::OneShotTimer; | 17 using base::OneShotTimer; |
18 using base::Thread; | 18 using base::Thread; |
19 using base::TimeDelta; | 19 using base::TimeDelta; |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
21 | 21 |
22 namespace browser_sync { | 22 namespace browser_sync { |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 MessageLoop::current()->PostTask(FROM_HERE, | 97 MessageLoop::current()->PostTask(FROM_HERE, |
98 base::Bind(&SyncBrowserThreadModelWorkerTest::ScheduleWork, | 98 base::Bind(&SyncBrowserThreadModelWorkerTest::ScheduleWork, |
99 factory()->GetWeakPtr())); | 99 factory()->GetWeakPtr())); |
100 MessageLoop::current()->Run(); | 100 MessageLoop::current()->Run(); |
101 EXPECT_TRUE(did_do_work()); | 101 EXPECT_TRUE(did_do_work()); |
102 } | 102 } |
103 | 103 |
104 } // namespace | 104 } // namespace |
105 | 105 |
106 } // namespace browser_sync | 106 } // namespace browser_sync |
OLD | NEW |