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

Unified Diff: components/sync/engine_impl/get_updates_processor_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/engine_impl/get_updates_processor_unittest.cc
diff --git a/sync/engine/get_updates_processor_unittest.cc b/components/sync/engine_impl/get_updates_processor_unittest.cc
similarity index 90%
rename from sync/engine/get_updates_processor_unittest.cc
rename to components/sync/engine_impl/get_updates_processor_unittest.cc
index 56239283afbbffd6459c2c53cca9c223ad2e6478..cc3be1c7d8d01b9b46a77d9f2eb5885e6f5579fb 100644
--- a/sync/engine/get_updates_processor_unittest.cc
+++ b/components/sync/engine_impl/get_updates_processor_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/engine/get_updates_processor.h"
+#include "components/sync/engine_impl/get_updates_processor.h"
#include <stdint.h>
@@ -11,17 +11,17 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
-#include "sync/engine/get_updates_delegate.h"
-#include "sync/engine/update_handler.h"
-#include "sync/internal_api/public/base/model_type_test_util.h"
-#include "sync/protocol/sync.pb.h"
-#include "sync/sessions/debug_info_getter.h"
-#include "sync/sessions/nudge_tracker.h"
-#include "sync/sessions/status_controller.h"
-#include "sync/test/engine/fake_model_worker.h"
-#include "sync/test/engine/mock_update_handler.h"
-#include "sync/test/mock_invalidation.h"
-#include "sync/test/sessions/mock_debug_info_getter.h"
+#include "components/sync/base/model_type_test_util.h"
+#include "components/sync/engine_impl/get_updates_delegate.h"
+#include "components/sync/engine_impl/update_handler.h"
+#include "components/sync/protocol/sync.pb.h"
+#include "components/sync/sessions_impl/debug_info_getter.h"
+#include "components/sync/sessions_impl/nudge_tracker.h"
+#include "components/sync/sessions_impl/status_controller.h"
+#include "components/sync/test/engine/fake_model_worker.h"
+#include "components/sync/test/engine/mock_update_handler.h"
+#include "components/sync/test/mock_invalidation.h"
+#include "components/sync/test/sessions/mock_debug_info_getter.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
@@ -41,9 +41,9 @@ using sessions::MockDebugInfoGetter;
// A test fixture for tests exercising download updates functions.
class GetUpdatesProcessorTest : public ::testing::Test {
protected:
- GetUpdatesProcessorTest() :
- kTestStartTime(base::TimeTicks::Now()),
- update_handler_deleter_(&update_handler_map_) {}
+ GetUpdatesProcessorTest()
+ : kTestStartTime(base::TimeTicks::Now()),
+ update_handler_deleter_(&update_handler_map_) {}
void SetUp() override {
AddUpdateHandler(AUTOFILL);
@@ -51,9 +51,7 @@ class GetUpdatesProcessorTest : public ::testing::Test {
AddUpdateHandler(PREFERENCES);
}
- ModelTypeSet enabled_types() {
- return enabled_types_;
- }
+ ModelTypeSet enabled_types() { return enabled_types_; }
std::unique_ptr<GetUpdatesProcessor> BuildGetUpdatesProcessor(
const GetUpdatesDelegate& delegate) {
@@ -337,9 +335,8 @@ TEST_F(GetUpdatesProcessorTest, InvalidResponse) {
sessions::StatusController status;
std::unique_ptr<GetUpdatesProcessor> processor(
BuildGetUpdatesProcessor(normal_delegate));
- SyncerError error = processor->ProcessResponse(gu_response,
- enabled_types(),
- &status);
+ SyncerError error =
+ processor->ProcessResponse(gu_response, enabled_types(), &status);
EXPECT_EQ(error, SERVER_RESPONSE_VALIDATION_FAILED);
}
@@ -354,9 +351,8 @@ TEST_F(GetUpdatesProcessorTest, MoreToDownloadResponse) {
sessions::StatusController status;
std::unique_ptr<GetUpdatesProcessor> processor(
BuildGetUpdatesProcessor(normal_delegate));
- SyncerError error = processor->ProcessResponse(gu_response,
- enabled_types(),
- &status);
+ SyncerError error =
+ processor->ProcessResponse(gu_response, enabled_types(), &status);
EXPECT_EQ(error, SERVER_MORE_TO_DOWNLOAD);
}
@@ -371,9 +367,8 @@ TEST_F(GetUpdatesProcessorTest, NormalResponseTest) {
sessions::StatusController status;
std::unique_ptr<GetUpdatesProcessor> processor(
BuildGetUpdatesProcessor(normal_delegate));
- SyncerError error = processor->ProcessResponse(gu_response,
- enabled_types(),
- &status);
+ SyncerError error =
+ processor->ProcessResponse(gu_response, enabled_types(), &status);
EXPECT_EQ(error, SYNCER_OK);
}
@@ -391,17 +386,11 @@ class GetUpdatesProcessorApplyUpdatesTest : public GetUpdatesProcessorTest {
autofill_handler_ = AddUpdateHandler(AUTOFILL);
}
- ModelTypeSet GetGuTypes() {
- return ModelTypeSet(AUTOFILL);
- }
+ ModelTypeSet GetGuTypes() { return ModelTypeSet(AUTOFILL); }
- MockUpdateHandler* GetNonAppliedHandler() {
- return bookmarks_handler_;
- }
+ MockUpdateHandler* GetNonAppliedHandler() { return bookmarks_handler_; }
- MockUpdateHandler* GetAppliedHandler() {
- return autofill_handler_;
- }
+ MockUpdateHandler* GetAppliedHandler() { return autofill_handler_; }
private:
MockUpdateHandler* bookmarks_handler_;
@@ -481,17 +470,11 @@ class DownloadUpdatesDebugInfoTest : public ::testing::Test {
DownloadUpdatesDebugInfoTest() {}
~DownloadUpdatesDebugInfoTest() override {}
- sessions::StatusController* status() {
- return &status_;
- }
+ sessions::StatusController* status() { return &status_; }
- sessions::DebugInfoGetter* debug_info_getter() {
- return &debug_info_getter_;
- }
+ sessions::DebugInfoGetter* debug_info_getter() { return &debug_info_getter_; }
- void AddDebugEvent() {
- debug_info_getter_.AddDebugEvent();
- }
+ void AddDebugEvent() { debug_info_getter_.AddDebugEvent(); }
private:
sessions::StatusController status_;
« no previous file with comments | « components/sync/engine_impl/get_updates_processor.cc ('k') | components/sync/engine_impl/model_type_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698