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

Unified Diff: components/sync/driver/glue/sync_backend_registrar_unittest.cc

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/driver/glue/sync_backend_registrar_unittest.cc
diff --git a/components/sync_driver/glue/sync_backend_registrar_unittest.cc b/components/sync/driver/glue/sync_backend_registrar_unittest.cc
similarity index 93%
rename from components/sync_driver/glue/sync_backend_registrar_unittest.cc
rename to components/sync/driver/glue/sync_backend_registrar_unittest.cc
index 82ec5f24895d854b980ee9891c7f899b31164e41..d24424db442eea827e7faf56e915ba50b7e94b04 100644
--- a/components/sync_driver/glue/sync_backend_registrar_unittest.cc
+++ b/components/sync/driver/glue/sync_backend_registrar_unittest.cc
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/sync_driver/glue/sync_backend_registrar.h"
+#include "components/sync/driver/glue/sync_backend_registrar.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/sync/base/model_type.h"
#include "components/sync/core/test/test_user_share.h"
+#include "components/sync/driver/change_processor_mock.h"
+#include "components/sync/driver/fake_sync_client.h"
+#include "components/sync/driver/glue/browser_thread_model_worker.h"
+#include "components/sync/driver/sync_api_component_factory_mock.h"
#include "components/sync/engine/passive_model_worker.h"
-#include "components/sync_driver/change_processor_mock.h"
-#include "components/sync_driver/fake_sync_client.h"
-#include "components/sync_driver/glue/browser_thread_model_worker.h"
-#include "components/sync_driver/sync_api_component_factory_mock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -81,9 +81,7 @@ class SyncBackendRegistrarTest : public testing::Test {
public:
void TestNonUIDataTypeActivationAsync(sync_driver::ChangeProcessor* processor,
base::WaitableEvent* done) {
- registrar_->ActivateDataType(AUTOFILL,
- syncer::GROUP_DB,
- processor,
+ registrar_->ActivateDataType(AUTOFILL, syncer::GROUP_DB, processor,
test_user_share_.user_share());
syncer::ModelSafeRoutingInfo expected_routing_info;
expected_routing_info[AUTOFILL] = syncer::GROUP_DB;
@@ -167,7 +165,7 @@ TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) {
registrar_->SetInitialTypes(ModelTypeSet());
EXPECT_FALSE(registrar_->IsNigoriEnabled());
{
- std::vector<scoped_refptr<syncer::ModelSafeWorker> > workers;
+ std::vector<scoped_refptr<syncer::ModelSafeWorker>> workers;
registrar_->GetWorkers(&workers);
EXPECT_EQ(4u, workers.size());
}
@@ -181,7 +179,7 @@ TEST_F(SyncBackendRegistrarTest, ConstructorNonEmpty) {
registrar_->SetInitialTypes(initial_types);
EXPECT_TRUE(registrar_->IsNigoriEnabled());
{
- std::vector<scoped_refptr<syncer::ModelSafeWorker> > workers;
+ std::vector<scoped_refptr<syncer::ModelSafeWorker>> workers;
registrar_->GetWorkers(&workers);
EXPECT_EQ(4u, workers.size());
}
@@ -240,20 +238,17 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateUIDataType) {
StrictMock<sync_driver::ChangeProcessorMock> change_processor_mock;
EXPECT_CALL(change_processor_mock, StartImpl());
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(true));
EXPECT_CALL(change_processor_mock, ApplyChangesFromSyncModel(NULL, _, _));
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(true));
EXPECT_CALL(change_processor_mock, CommitChangesFromSyncModel());
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(false));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(false));
const ModelTypeSet types(BOOKMARKS);
EXPECT_EQ(types, registrar_->ConfigureDataTypes(types, ModelTypeSet()));
registrar_->ActivateDataType(BOOKMARKS, syncer::GROUP_UI,
- &change_processor_mock,
- test_user_share_.user_share());
+ &change_processor_mock,
+ test_user_share_.user_share());
{
syncer::ModelSafeRoutingInfo expected_routing_info;
expected_routing_info[BOOKMARKS] = syncer::GROUP_UI;
@@ -280,14 +275,11 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) {
StrictMock<sync_driver::ChangeProcessorMock> change_processor_mock;
EXPECT_CALL(change_processor_mock, StartImpl());
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(true));
EXPECT_CALL(change_processor_mock, ApplyChangesFromSyncModel(NULL, _, _));
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(true));
EXPECT_CALL(change_processor_mock, CommitChangesFromSyncModel());
- EXPECT_CALL(change_processor_mock, IsRunning())
- .WillRepeatedly(Return(false));
+ EXPECT_CALL(change_processor_mock, IsRunning()).WillRepeatedly(Return(false));
const ModelTypeSet types(AUTOFILL);
EXPECT_EQ(types, registrar_->ConfigureDataTypes(types, ModelTypeSet()));
« no previous file with comments | « components/sync/driver/glue/sync_backend_registrar.cc ('k') | components/sync/driver/glue/ui_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698