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

Side by Side Diff: components/sync_driver/model_association_manager_unittest.cc

Issue 1380693004: [Sync] Fixing sync_driver lint violations and adding PRESUBMIT lint check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cross
Patch Set: Removing lint fixes for revisit files, removing revisit patch dep. Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "components/sync_driver/fake_data_type_controller.h" 7 #include "components/sync_driver/fake_data_type_controller.h"
8 #include "components/sync_driver/model_association_manager.h" 8 #include "components/sync_driver/model_association_manager.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 17 matching lines...) Expand all
28 }; 28 };
29 29
30 FakeDataTypeController* GetController( 30 FakeDataTypeController* GetController(
31 const DataTypeController::TypeMap& controllers, 31 const DataTypeController::TypeMap& controllers,
32 syncer::ModelType model_type) { 32 syncer::ModelType model_type) {
33 DataTypeController::TypeMap::const_iterator it = 33 DataTypeController::TypeMap::const_iterator it =
34 controllers.find(model_type); 34 controllers.find(model_type);
35 if (it == controllers.end()) { 35 if (it == controllers.end()) {
36 return NULL; 36 return NULL;
37 } 37 }
38 return (FakeDataTypeController*)(it->second.get()); 38 return static_cast<FakeDataTypeController*>(it->second.get());
39 } 39 }
40 40
41 ACTION_P(VerifyResult, expected_result) { 41 ACTION_P(VerifyResult, expected_result) {
42 EXPECT_EQ(arg0.status, expected_result.status); 42 EXPECT_EQ(arg0.status, expected_result.status);
43 EXPECT_TRUE(arg0.requested_types.Equals(expected_result.requested_types)); 43 EXPECT_TRUE(arg0.requested_types.Equals(expected_result.requested_types));
44 } 44 }
45 45
46 class SyncModelAssociationManagerTest : public testing::Test { 46 class SyncModelAssociationManagerTest : public testing::Test {
47 public: 47 public:
48 SyncModelAssociationManagerTest() { 48 SyncModelAssociationManagerTest() {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 EXPECT_CALL(delegate_, 378 EXPECT_CALL(delegate_,
379 OnSingleDataTypeWillStop(syncer::BOOKMARKS, _)); 379 OnSingleDataTypeWillStop(syncer::BOOKMARKS, _));
380 model_association_manager.GetTimerForTesting()->user_task().Run(); 380 model_association_manager.GetTimerForTesting()->user_task().Run();
381 381
382 EXPECT_EQ(DataTypeController::NOT_RUNNING, 382 EXPECT_EQ(DataTypeController::NOT_RUNNING,
383 GetController(controllers_, syncer::BOOKMARKS)->state()); 383 GetController(controllers_, syncer::BOOKMARKS)->state());
384 } 384 }
385 385
386 } // namespace sync_driver 386 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/model_association_manager.h ('k') | components/sync_driver/non_ui_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698