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

Unified Diff: components/sync/core_impl/js_sync_manager_observer_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/core_impl/js_sync_manager_observer_unittest.cc
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/components/sync/core_impl/js_sync_manager_observer_unittest.cc
similarity index 74%
rename from sync/internal_api/js_sync_manager_observer_unittest.cc
rename to components/sync/core_impl/js_sync_manager_observer_unittest.cc
index 4054b9fcffe81c63182eb32bc1a2fa46b5c07f54..339e45c18ed1cd43936c551638e68c49925233f7 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/components/sync/core_impl/js_sync_manager_observer_unittest.cc
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/js_sync_manager_observer.h"
+#include "components/sync/core_impl/js_sync_manager_observer.h"
#include <vector>
#include "base/location.h"
#include "base/run_loop.h"
#include "base/values.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/internal_api/public/connection_status.h"
-#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/util/sync_string_conversions.h"
-#include "sync/internal_api/public/util/weak_handle.h"
-#include "sync/js/js_event_details.h"
-#include "sync/js/js_test_util.h"
-#include "sync/protocol/sync_protocol_error.h"
+#include "components/sync/base/model_type.h"
+#include "components/sync/base/sync_string_conversions.h"
+#include "components/sync/base/weak_handle.h"
+#include "components/sync/core/connection_status.h"
+#include "components/sync/js/js_event_details.h"
+#include "components/sync/js/js_test_util.h"
+#include "components/sync/protocol/sync_protocol_error.h"
+#include "components/sync/sessions/sync_session_snapshot.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
@@ -41,9 +41,7 @@ class JsSyncManagerObserverTest : public testing::Test {
StrictMock<MockJsEventHandler> mock_js_event_handler_;
JsSyncManagerObserver js_sync_manager_observer_;
- void PumpLoop() {
- base::RunLoop().RunUntilIdle();
- }
+ void PumpLoop() { base::RunLoop().RunUntilIdle(); }
};
TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
@@ -58,25 +56,15 @@ TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
HasDetailsAsDictionary(expected_details)));
js_sync_manager_observer_.OnInitializationComplete(
- WeakHandle<JsBackend>(),
- WeakHandle<DataTypeDebugInfoListener>(),
- true,
+ WeakHandle<JsBackend>(), WeakHandle<DataTypeDebugInfoListener>(), true,
restored_types);
PumpLoop();
}
TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
sessions::SyncSessionSnapshot snapshot(
- sessions::ModelNeutralState(),
- ProgressMarkerMap(),
- false,
- 5,
- 2,
- 7,
- false,
- 0,
- base::Time::Now(),
- base::Time::Now(),
+ sessions::ModelNeutralState(), ProgressMarkerMap(), false, 5, 2, 7, false,
+ 0, base::Time::Now(), base::Time::Now(),
std::vector<int>(MODEL_TYPE_COUNT, 0),
std::vector<int>(MODEL_TYPE_COUNT, 0),
sync_pb::GetUpdatesCallerInfo::UNKNOWN);
@@ -100,18 +88,16 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) {
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onActionableError",
- HasDetailsAsDictionary(expected_details)));
+ HasDetailsAsDictionary(expected_details)));
js_sync_manager_observer_.OnActionableError(sync_error);
PumpLoop();
}
-
TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) {
const ConnectionStatus kStatus = CONNECTION_AUTH_ERROR;
base::DictionaryValue expected_details;
- expected_details.SetString("status",
- ConnectionStatusToString(kStatus));
+ expected_details.SetString("status", ConnectionStatusToString(kStatus));
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onConnectionStatusChange",
« no previous file with comments | « components/sync/core_impl/js_sync_manager_observer.cc ('k') | components/sync/core_impl/model_type_connector_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698