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

Side by Side Diff: chrome/browser/sync/engine/download_updates_command_unittest.cc

Issue 8313002: Revert 105667 - Send important client side event information to the server. We create a class cal... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/sync/engine/download_updates_command.h" 5 #include "chrome/browser/sync/engine/download_updates_command.h"
6 #include "chrome/browser/sync/protocol/autofill_specifics.pb.h" 6 #include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
7 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" 7 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
8 #include "chrome/browser/sync/protocol/preference_specifics.pb.h" 8 #include "chrome/browser/sync/protocol/preference_specifics.pb.h"
9 #include "chrome/browser/sync/protocol/sync.pb.h" 9 #include "chrome/browser/sync/protocol/sync.pb.h"
10 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
11 #include "chrome/browser/sync/test/engine/proto_extension_validator.h" 11 #include "chrome/browser/sync/test/engine/proto_extension_validator.h"
12 #include "chrome/browser/sync/test/engine/syncer_command_test.h" 12 #include "chrome/browser/sync/test/engine/syncer_command_test.h"
13 13
14 using ::testing::_;
15 namespace browser_sync { 14 namespace browser_sync {
16 15
17 using syncable::FIRST_REAL_MODEL_TYPE; 16 using syncable::FIRST_REAL_MODEL_TYPE;
18 using syncable::MODEL_TYPE_COUNT; 17 using syncable::MODEL_TYPE_COUNT;
19 18
20 // A test fixture for tests exercising DownloadUpdatesCommandTest. 19 // A test fixture for tests exercising DownloadUpdatesCommandTest.
21 class DownloadUpdatesCommandTest : public SyncerCommandTest { 20 class DownloadUpdatesCommandTest : public SyncerCommandTest {
22 protected: 21 protected:
23 DownloadUpdatesCommandTest() {} 22 DownloadUpdatesCommandTest() {}
24 23
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 SetRoutingInfo(types); 125 SetRoutingInfo(types);
127 sessions::SyncSourceInfo source; 126 sessions::SyncSourceInfo source;
128 source.types[syncable::AUTOFILL] = "autofill_payload"; 127 source.types[syncable::AUTOFILL] = "autofill_payload";
129 source.types[syncable::BOOKMARKS] = "bookmark_payload"; 128 source.types[syncable::BOOKMARKS] = "bookmark_payload";
130 source.types[syncable::PREFERENCES] = "preferences_payload"; 129 source.types[syncable::PREFERENCES] = "preferences_payload";
131 mock_server()->ExpectGetUpdatesRequestTypes(ModelTypeBitSetFromSet(types)); 130 mock_server()->ExpectGetUpdatesRequestTypes(ModelTypeBitSetFromSet(types));
132 mock_server()->ExpectGetUpdatesRequestPayloads(source.types); 131 mock_server()->ExpectGetUpdatesRequestPayloads(source.types);
133 command_.ExecuteImpl(session(source)); 132 command_.ExecuteImpl(session(source));
134 } 133 }
135 134
136 TEST_F(DownloadUpdatesCommandTest, VerifyAppendDebugInfo) {
137 sync_pb::DebugInfo debug_info;
138 EXPECT_CALL(*(mock_debug_info_getter()), GetAndClearDebugInfo(_))
139 .Times(1);
140 command_.AppendClientDebugInfoIfNeeded(session(), &debug_info);
141
142 // Now try to add it once more and make sure |GetAndClearDebugInfo| is not
143 // called.
144 command_.AppendClientDebugInfoIfNeeded(session(), &debug_info);
145 }
146
147 } // namespace browser_sync 135 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command.cc ('k') | chrome/browser/sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698