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

Side by Side Diff: sync/engine/build_commit_command_unittest.cc

Issue 10735041: Remove syncproto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most comments Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sync/engine/build_commit_command.cc ('k') | sync/engine/commit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sync/engine/build_commit_command.h" 5 #include "sync/engine/build_commit_command.h"
6 #include "sync/test/engine/syncer_command_test.h" 6 #include "sync/test/engine/syncer_command_test.h"
7 7
8 namespace syncer { 8 namespace syncer {
9 9
10 // A test fixture for tests exercising ClearDataCommandTest. 10 // A test fixture for tests exercising ClearDataCommandTest.
11 class BuildCommitCommandTest : public SyncerCommandTest { 11 class BuildCommitCommandTest : public SyncerCommandTest {
12 protected: 12 protected:
13 BuildCommitCommandTest() 13 BuildCommitCommandTest()
14 : batch_commit_set_(ModelSafeRoutingInfo()), 14 : batch_commit_set_(ModelSafeRoutingInfo()),
15 command_(batch_commit_set_, &commit_message_) { 15 command_(batch_commit_set_, &commit_message_) {
16 } 16 }
17 17
18 private: 18 private:
19 sessions::OrderedCommitSet batch_commit_set_; 19 sessions::OrderedCommitSet batch_commit_set_;
20 ClientToServerMessage commit_message_; 20 sync_pb::ClientToServerMessage commit_message_;
21 21
22 protected: 22 protected:
23 BuildCommitCommand command_; 23 BuildCommitCommand command_;
24 24
25 private: 25 private:
26 DISALLOW_COPY_AND_ASSIGN(BuildCommitCommandTest); 26 DISALLOW_COPY_AND_ASSIGN(BuildCommitCommandTest);
27 }; 27 };
28 28
29 TEST_F(BuildCommitCommandTest, InterpolatePosition) { 29 TEST_F(BuildCommitCommandTest, InterpolatePosition) {
30 EXPECT_LT(BuildCommitCommand::GetFirstPosition(), 30 EXPECT_LT(BuildCommitCommand::GetFirstPosition(),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 command_.InterpolatePosition(BuildCommitCommand::GetFirstPosition(), -1)); 96 command_.InterpolatePosition(BuildCommitCommand::GetFirstPosition(), -1));
97 EXPECT_EQ(BuildCommitCommand::GetGap() / 8, 97 EXPECT_EQ(BuildCommitCommand::GetGap() / 8,
98 command_.InterpolatePosition(0, BuildCommitCommand::GetGap())); 98 command_.InterpolatePosition(0, BuildCommitCommand::GetGap()));
99 EXPECT_EQ(BuildCommitCommand::GetGap() / 4, 99 EXPECT_EQ(BuildCommitCommand::GetGap() / 4,
100 command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2)); 100 command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2));
101 EXPECT_EQ(BuildCommitCommand::GetGap(), 101 EXPECT_EQ(BuildCommitCommand::GetGap(),
102 command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2 + 1)); 102 command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2 + 1));
103 } 103 }
104 104
105 } // namespace syncer 105 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/build_commit_command.cc ('k') | sync/engine/commit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698