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 "sync/notifier/ack_tracker.h" | 5 #include "sync/notifier/ack_tracker.h" |
6 | 6 |
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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
11 #include "google/cacheinvalidation/include/types.h" | 11 #include "google/cacheinvalidation/include/types.h" |
12 #include "google/cacheinvalidation/types.pb.h" | 12 #include "google/cacheinvalidation/types.pb.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace syncer { | 16 namespace syncer { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 EXPECT_EQ(base::TimeDelta::FromSeconds(120), GetTimerDelay()); | 343 EXPECT_EQ(base::TimeDelta::FromSeconds(120), GetTimerDelay()); |
344 fake_tick_clock_.LeapForward(120); | 344 fake_tick_clock_.LeapForward(120); |
345 EXPECT_CALL(delegate_, OnTimeout(ids)); | 345 EXPECT_CALL(delegate_, OnTimeout(ids)); |
346 EXPECT_TRUE(TriggerTimeoutNow()); | 346 EXPECT_TRUE(TriggerTimeoutNow()); |
347 | 347 |
348 ack_tracker_.Ack(ids); | 348 ack_tracker_.Ack(ids); |
349 EXPECT_TRUE(ack_tracker_.IsQueueEmptyForTest()); | 349 EXPECT_TRUE(ack_tracker_.IsQueueEmptyForTest()); |
350 } | 350 } |
351 | 351 |
352 } // namespace syncer | 352 } // namespace syncer |
OLD | NEW |