OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync/model/attachments/attachment_service_proxy.h" | 5 #include "components/sync/model/attachments/attachment_service_proxy.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
| 13 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
16 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
17 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
18 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
20 #include "components/sync/base/model_type.h" | 21 #include "components/sync/base/model_type.h" |
21 #include "components/sync/protocol/sync.pb.h" | 22 #include "components/sync/protocol/sync.pb.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // don't crash and the count remains the same. | 177 // don't crash and the count remains the same. |
177 proxy_->GetOrDownloadAttachments(AttachmentIdList(), | 178 proxy_->GetOrDownloadAttachments(AttachmentIdList(), |
178 callback_get_or_download_); | 179 callback_get_or_download_); |
179 WaitForStubThread(); | 180 WaitForStubThread(); |
180 WaitForStubThread(); | 181 WaitForStubThread(); |
181 base::RunLoop().RunUntilIdle(); | 182 base::RunLoop().RunUntilIdle(); |
182 EXPECT_EQ(1, count_callback_get_or_download_); | 183 EXPECT_EQ(1, count_callback_get_or_download_); |
183 } | 184 } |
184 | 185 |
185 } // namespace syncer | 186 } // namespace syncer |
OLD | NEW |