| 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/core/attachments/task_queue.h" | 5 #include "components/sync/core/attachments/task_queue.h" |
| 6 | 6 |
| 7 #include <utility> | |
| 8 #include <vector> | 7 #include <vector> |
| 9 | 8 |
| 10 #include "base/bind.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 14 #include "base/timer/mock_timer.h" | 11 #include "base/timer/mock_timer.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 13 |
| 17 using base::TimeDelta; | 14 using base::TimeDelta; |
| 18 | 15 |
| 19 namespace syncer { | 16 namespace syncer { |
| 20 | 17 |
| 21 namespace { | 18 namespace { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 mock_timer->Fire(); | 223 mock_timer->Fire(); |
| 227 RunLoop(); | 224 RunLoop(); |
| 228 ASSERT_FALSE(mock_timer->IsRunning()); | 225 ASSERT_FALSE(mock_timer->IsRunning()); |
| 229 ASSERT_EQ(1U, dispatched_.size()); | 226 ASSERT_EQ(1U, dispatched_.size()); |
| 230 EXPECT_EQ(1, dispatched_.front()); | 227 EXPECT_EQ(1, dispatched_.front()); |
| 231 dispatched_.clear(); | 228 dispatched_.clear(); |
| 232 queue_->MarkAsSucceeded(1); | 229 queue_->MarkAsSucceeded(1); |
| 233 } | 230 } |
| 234 | 231 |
| 235 } // namespace syncer | 232 } // namespace syncer |
| OLD | NEW |