summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorblundell <blundell@chromium.org>2015-10-20 12:06:20 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-20 19:07:13 +0000
commite772a83b47267033c022f6c10bf64eb04f057806 (patch)
tree6f9bd2370313fa380e6ccccb643b6625ed06632e /components
parent8684c62ec7738b2a1ef5a15a3c1979a9a71a24c1 (diff)
downloadchromium_src-e772a83b47267033c022f6c10bf64eb04f057806.zip
chromium_src-e772a83b47267033c022f6c10bf64eb04f057806.tar.gz
chromium_src-e772a83b47267033c022f6c10bf64eb04f057806.tar.bz2
Unify include structure in //components/sync_driver unittests
This CL hoists the includes of the files being tested to the top of the unittest file in all unittests under //components/sync_driver. Review URL: https://codereview.chromium.org/1414233002 Cr-Commit-Position: refs/heads/master@{#355124}
Diffstat (limited to 'components')
-rw-r--r--components/sync_driver/about_sync_util_unittest.cc3
-rw-r--r--components/sync_driver/device_info_data_type_controller_unittest.cc3
-rw-r--r--components/sync_driver/frontend_data_type_controller_unittest.cc7
-rw-r--r--components/sync_driver/glue/ui_model_worker_unittest.cc3
-rw-r--r--components/sync_driver/model_association_manager_unittest.cc3
-rw-r--r--components/sync_driver/non_blocking_data_type_controller_unittest.cc3
-rw-r--r--components/sync_driver/sync_policy_handler_unittest.cc3
7 files changed, 16 insertions, 9 deletions
diff --git a/components/sync_driver/about_sync_util_unittest.cc b/components/sync_driver/about_sync_util_unittest.cc
index 47edbf1..fcfa2b4 100644
--- a/components/sync_driver/about_sync_util_unittest.cc
+++ b/components/sync_driver/about_sync_util_unittest.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/strings/utf_string_conversions.h"
#include "components/sync_driver/about_sync_util.h"
+
+#include "base/strings/utf_string_conversions.h"
#include "components/sync_driver/fake_sync_service.h"
#include "components/version_info/version_info.h"
#include "sync/internal_api/public/engine/sync_status.h"
diff --git a/components/sync_driver/device_info_data_type_controller_unittest.cc b/components/sync_driver/device_info_data_type_controller_unittest.cc
index 4393dfdd..5037407 100644
--- a/components/sync_driver/device_info_data_type_controller_unittest.cc
+++ b/components/sync_driver/device_info_data_type_controller_unittest.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/sync_driver/device_info_data_type_controller.h"
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
-#include "components/sync_driver/device_info_data_type_controller.h"
#include "components/sync_driver/fake_sync_client.h"
#include "components/sync_driver/local_device_info_provider_mock.h"
#include "components/sync_driver/sync_api_component_factory.h"
diff --git a/components/sync_driver/frontend_data_type_controller_unittest.cc b/components/sync_driver/frontend_data_type_controller_unittest.cc
index 520b44b..df557df 100644
--- a/components/sync_driver/frontend_data_type_controller_unittest.cc
+++ b/components/sync_driver/frontend_data_type_controller_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/sync_driver/frontend_data_type_controller.h"
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
@@ -15,7 +17,6 @@
#include "components/sync_driver/data_type_controller_mock.h"
#include "components/sync_driver/fake_sync_client.h"
#include "components/sync_driver/fake_sync_service.h"
-#include "components/sync_driver/frontend_data_type_controller.h"
#include "components/sync_driver/frontend_data_type_controller_mock.h"
#include "components/sync_driver/model_associator_mock.h"
#include "components/sync_driver/sync_api_component_factory_mock.h"
@@ -50,6 +51,8 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController {
syncer::ModelType type() const override { return syncer::BOOKMARKS; }
private:
+ ~FrontendDataTypeControllerFake() override {}
+
void CreateSyncComponents() override {
sync_driver::SyncApiComponentFactory::SyncComponents sync_components =
sync_client_->GetSyncApiComponentFactory()->
@@ -72,8 +75,6 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController {
void RecordStartFailure(DataTypeController::ConfigureResult result) override {
mock_->RecordStartFailure(result);
}
- private:
- ~FrontendDataTypeControllerFake() override {}
FrontendDataTypeControllerMock* mock_;
sync_driver::SyncClient* sync_client_;
diff --git a/components/sync_driver/glue/ui_model_worker_unittest.cc b/components/sync_driver/glue/ui_model_worker_unittest.cc
index b9be1a1..ec7bc88 100644
--- a/components/sync_driver/glue/ui_model_worker_unittest.cc
+++ b/components/sync_driver/glue/ui_model_worker_unittest.cc
@@ -2,6 +2,8 @@
// 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/ui_model_worker.h"
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
@@ -12,7 +14,6 @@
#include "base/synchronization/waitable_event.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
-#include "components/sync_driver/glue/ui_model_worker.h"
#include "testing/gtest/include/gtest/gtest.h"
using browser_sync::UIModelWorker;
diff --git a/components/sync_driver/model_association_manager_unittest.cc b/components/sync_driver/model_association_manager_unittest.cc
index f1e9e1e..5d614c9 100644
--- a/components/sync_driver/model_association_manager_unittest.cc
+++ b/components/sync_driver/model_association_manager_unittest.cc
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/sync_driver/model_association_manager.h"
+
#include "base/callback.h"
#include "base/message_loop/message_loop.h"
#include "components/sync_driver/fake_data_type_controller.h"
-#include "components/sync_driver/model_association_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/sync_driver/non_blocking_data_type_controller_unittest.cc b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
index 605ad1bb..2dea552 100644
--- a/components/sync_driver/non_blocking_data_type_controller_unittest.cc
+++ b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/sync_driver/non_blocking_data_type_controller.h"
+
#include <list>
#include "base/bind.h"
@@ -12,7 +14,6 @@
#include "base/sequenced_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "base/thread_task_runner_handle.h"
-#include "components/sync_driver/non_blocking_data_type_controller.h"
#include "sync/engine/commit_queue.h"
#include "sync/internal_api/public/activation_context.h"
#include "sync/internal_api/public/base/model_type.h"
diff --git a/components/sync_driver/sync_policy_handler_unittest.cc b/components/sync_driver/sync_policy_handler_unittest.cc
index 2d95ec1..73ed7dd 100644
--- a/components/sync_driver/sync_policy_handler_unittest.cc
+++ b/components/sync_driver/sync_policy_handler_unittest.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/sync_driver/sync_policy_handler.h"
+
#include "base/prefs/pref_value_map.h"
#include "base/values.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/sync_driver/pref_names.h"
-#include "components/sync_driver/sync_policy_handler.h"
#include "policy/policy_constants.h"
#include "testing/gtest/include/gtest/gtest.h"