Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: components/sync/engine_impl/cycle/nudge_tracker_unittest.cc

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/sync/sessions_impl/nudge_tracker.h" 5 #include "components/sync/engine_impl/cycle/nudge_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
(...skipping 12 matching lines...) Expand all
28 return testing::AssertionSuccess(); 28 return testing::AssertionSuccess();
29 } else { 29 } else {
30 return testing::AssertionFailure() 30 return testing::AssertionFailure()
31 << "Left side " << ModelTypeSetToString(a) 31 << "Left side " << ModelTypeSetToString(a)
32 << ", does not match rigth side: " << ModelTypeSetToString(b); 32 << ", does not match rigth side: " << ModelTypeSetToString(b);
33 } 33 }
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 namespace sessions {
39
40 class NudgeTrackerTest : public ::testing::Test { 38 class NudgeTrackerTest : public ::testing::Test {
41 public: 39 public:
42 NudgeTrackerTest() { SetInvalidationsInSync(); } 40 NudgeTrackerTest() { SetInvalidationsInSync(); }
43 41
44 static size_t GetHintBufferSize() { 42 static size_t GetHintBufferSize() {
45 // Assumes that no test has adjusted this size. 43 // Assumes that no test has adjusted this size.
46 return NudgeTracker::kDefaultMaxPayloadsPerType; 44 return NudgeTracker::kDefaultMaxPayloadsPerType;
47 } 45 }
48 46
49 bool InvalidationsOutOfSync() const { 47 bool InvalidationsOutOfSync() const {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 RecordSuccessfulSyncCycle(); 957 RecordSuccessfulSyncCycle();
960 EXPECT_TRUE(IsInvalidationAcknowledged(inv1_id)); 958 EXPECT_TRUE(IsInvalidationAcknowledged(inv1_id));
961 EXPECT_TRUE(IsInvalidationAcknowledged(inv2_id)); 959 EXPECT_TRUE(IsInvalidationAcknowledged(inv2_id));
962 EXPECT_TRUE(IsInvalidationAcknowledged(inv3_id)); 960 EXPECT_TRUE(IsInvalidationAcknowledged(inv3_id));
963 EXPECT_TRUE(IsInvalidationAcknowledged(inv4_id)); 961 EXPECT_TRUE(IsInvalidationAcknowledged(inv4_id));
964 EXPECT_TRUE(IsInvalidationAcknowledged(inv5_id)); 962 EXPECT_TRUE(IsInvalidationAcknowledged(inv5_id));
965 963
966 EXPECT_TRUE(AllInvalidationsAccountedFor()); 964 EXPECT_TRUE(AllInvalidationsAccountedFor());
967 } 965 }
968 966
969 } // namespace sessions
970 } // namespace syncer 967 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/cycle/nudge_tracker.cc ('k') | components/sync/engine_impl/cycle/status_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698