| 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_impl/protocol_event_buffer.h" | 5 #include "components/sync/engine_impl/events/protocol_event_buffer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "components/sync/engine/events/poll_get_updates_request_event.h" | 10 #include "components/sync/engine/events/poll_get_updates_request_event.h" |
| 11 #include "components/sync/engine/events/protocol_event.h" | 11 #include "components/sync/engine/events/protocol_event.h" |
| 12 #include "components/sync/protocol/sync.pb.h" | 12 #include "components/sync/protocol/sync.pb.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 std::vector<std::unique_ptr<ProtocolEvent>> buffered_events( | 65 std::vector<std::unique_ptr<ProtocolEvent>> buffered_events( |
| 66 buffer_.GetBufferedProtocolEvents()); | 66 buffer_.GetBufferedProtocolEvents()); |
| 67 ASSERT_EQ(ProtocolEventBuffer::kBufferSize, buffered_events.size()); | 67 ASSERT_EQ(ProtocolEventBuffer::kBufferSize, buffered_events.size()); |
| 68 | 68 |
| 69 for (size_t i = 1; i < ProtocolEventBuffer::kBufferSize + 1; ++i) { | 69 for (size_t i = 1; i < ProtocolEventBuffer::kBufferSize + 1; ++i) { |
| 70 EXPECT_TRUE(HasId(*(buffered_events[i - 1]), static_cast<int64_t>(i))); | 70 EXPECT_TRUE(HasId(*(buffered_events[i - 1]), static_cast<int64_t>(i))); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace syncer | 74 } // namespace syncer |
| OLD | NEW |