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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address 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/traffic_recorder.cc ('k') | sync/engine/update_applicator.h » ('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/traffic_recorder.h" 5 #include "sync/engine/traffic_recorder.h"
6 6
7 #include "sync/protocol/sync.pb.h" 7 #include "sync/protocol/sync.pb.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace csync { 10 namespace syncer {
11 11
12 const unsigned int kMaxMessages = 10; 12 const unsigned int kMaxMessages = 10;
13 const unsigned int kMaxMessageSize = 5 * 1024; 13 const unsigned int kMaxMessageSize = 5 * 1024;
14 14
15 // Ensure the number of records don't exceed |kMaxMessages|. 15 // Ensure the number of records don't exceed |kMaxMessages|.
16 TEST(TrafficRecorderTest, MaxRecordsTest) { 16 TEST(TrafficRecorderTest, MaxRecordsTest) {
17 TrafficRecorder recorder(kMaxMessages, kMaxMessageSize); 17 TrafficRecorder recorder(kMaxMessages, kMaxMessageSize);
18 sync_pb::ClientToServerResponse response; 18 sync_pb::ClientToServerResponse response;
19 19
20 for (unsigned int i = 0; i < 2*kMaxMessages; ++i) 20 for (unsigned int i = 0; i < 2*kMaxMessages; ++i)
(...skipping 11 matching lines...) Expand all
32 error->set_error_description(error_description); 32 error->set_error_description(error_description);
33 33
34 TrafficRecorder recorder(kMaxMessages, kMaxMessageSize); 34 TrafficRecorder recorder(kMaxMessages, kMaxMessageSize);
35 recorder.RecordClientToServerResponse(response); 35 recorder.RecordClientToServerResponse(response);
36 36
37 TrafficRecorder::TrafficRecord record = recorder.records().front(); 37 TrafficRecorder::TrafficRecord record = recorder.records().front();
38 EXPECT_TRUE(record.truncated); 38 EXPECT_TRUE(record.truncated);
39 EXPECT_TRUE(record.message.empty()); 39 EXPECT_TRUE(record.message.empty());
40 } 40 }
41 41
42 } //namespace csync 42 } // namespace syncer
43
OLDNEW
« no previous file with comments | « sync/engine/traffic_recorder.cc ('k') | sync/engine/update_applicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698