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

Side by Side Diff: sync/test/engine/mock_connection_manager.cc

Issue 11958029: [Sync] Add support for proxy types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Mock ServerConnectionManager class for use in client regression tests. 5 // Mock ServerConnectionManager class for use in client regression tests.
6 6
7 #include "sync/test/engine/mock_connection_manager.h" 7 #include "sync/test/engine/mock_connection_manager.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 if (fail_non_periodic_get_updates_) { 401 if (fail_non_periodic_get_updates_) {
402 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::PERIODIC, 402 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::PERIODIC,
403 gu.caller_info().source()); 403 gu.caller_info().source());
404 } 404 }
405 405
406 // Verify that the GetUpdates filter sent by the Syncer matches the test 406 // Verify that the GetUpdates filter sent by the Syncer matches the test
407 // expectation. 407 // expectation.
408 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { 408 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
409 ModelType model_type = ModelTypeFromInt(i); 409 ModelType model_type = ModelTypeFromInt(i);
410 if (syncer::VirtualTypes().Has(model_type))
411 continue;
410 sync_pb::DataTypeProgressMarker const* progress_marker = 412 sync_pb::DataTypeProgressMarker const* progress_marker =
411 GetProgressMarkerForType(gu.from_progress_marker(), model_type); 413 GetProgressMarkerForType(gu.from_progress_marker(), model_type);
412 EXPECT_EQ(expected_filter_.Has(model_type), (progress_marker != NULL)) 414 EXPECT_EQ(expected_filter_.Has(model_type), (progress_marker != NULL))
413 << "Syncer requested_types differs from test expectation."; 415 << "Syncer requested_types differs from test expectation.";
414 if (progress_marker) { 416 if (progress_marker) {
415 EXPECT_EQ((expected_states_.count(model_type) > 0 ? 417 EXPECT_EQ((expected_states_.count(model_type) > 0 ?
416 expected_states_[model_type].payload : 418 expected_states_[model_type].payload :
417 std::string()), 419 std::string()),
418 progress_marker->notification_hint()); 420 progress_marker->notification_hint());
419 } 421 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 614
613 void MockConnectionManager::UpdateConnectionStatus() { 615 void MockConnectionManager::UpdateConnectionStatus() {
614 if (!server_reachable_) { 616 if (!server_reachable_) {
615 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE; 617 server_status_ = HttpResponse::CONNECTION_UNAVAILABLE;
616 } else { 618 } else {
617 server_status_ = HttpResponse::SERVER_CONNECTION_OK; 619 server_status_ = HttpResponse::SERVER_CONNECTION_OK;
618 } 620 }
619 } 621 }
620 622
621 } // namespace syncer 623 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698