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

Unified Diff: components/sync/sessions_impl/test_util.h

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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
« no previous file with comments | « components/sync/sessions_impl/sync_session_context.cc ('k') | components/sync/sessions_impl/test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/sessions_impl/test_util.h
diff --git a/components/sync/sessions_impl/test_util.h b/components/sync/sessions_impl/test_util.h
deleted file mode 100644
index dc1028b51b67baa03d85156613ca8e1013c9318b..0000000000000000000000000000000000000000
--- a/components/sync/sessions_impl/test_util.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Utils to simulate various outcomes of a sync session.
-#ifndef COMPONENTS_SYNC_SESSIONS_IMPL_TEST_UTIL_H_
-#define COMPONENTS_SYNC_SESSIONS_IMPL_TEST_UTIL_H_
-
-#include "components/sync/engine_impl/syncer.h"
-#include "components/sync/sessions_impl/sync_session.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace syncer {
-namespace sessions {
-namespace test_util {
-
-// Configure sync cycle successes and failures.
-void SimulateGetEncryptionKeyFailed(
- ModelTypeSet requested_types,
- sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
- sessions::SyncSession* session);
-void SimulateConfigureSuccess(
- ModelTypeSet requested_types,
- sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
- sessions::SyncSession* session);
-void SimulateConfigureFailed(
- ModelTypeSet requested_types,
- sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
- sessions::SyncSession* session);
-void SimulateConfigureConnectionFailure(
- ModelTypeSet requested_types,
- sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
- sessions::SyncSession* session);
-
-// Normal mode sync cycle successes and failures.
-void SimulateNormalSuccess(ModelTypeSet requested_types,
- sessions::NudgeTracker* nudge_tracker,
- sessions::SyncSession* session);
-void SimulateDownloadUpdatesFailed(ModelTypeSet requested_types,
- sessions::NudgeTracker* nudge_tracker,
- sessions::SyncSession* session);
-void SimulateCommitFailed(ModelTypeSet requested_types,
- sessions::NudgeTracker* nudge_tracker,
- sessions::SyncSession* session);
-void SimulateConnectionFailure(ModelTypeSet requested_types,
- sessions::NudgeTracker* nudge_tracker,
- sessions::SyncSession* session);
-
-// Poll successes and failures.
-void SimulatePollSuccess(ModelTypeSet requested_types,
- sessions::SyncSession* session);
-void SimulatePollFailed(ModelTypeSet requested_types,
- sessions::SyncSession* session);
-
-void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session,
- base::TimeDelta delay);
-
-void SimulateThrottledImpl(sessions::SyncSession* session,
- const base::TimeDelta& delta);
-
-void SimulateTypesThrottledImpl(sessions::SyncSession* session,
- ModelTypeSet types,
- const base::TimeDelta& delta);
-
-// Works with poll cycles.
-void SimulatePollIntervalUpdateImpl(ModelTypeSet requested_types,
- sessions::SyncSession* session,
- const base::TimeDelta& new_poll);
-
-// Works with normal cycles.
-void SimulateSessionsCommitDelayUpdateImpl(
- ModelTypeSet requested_types,
- sessions::NudgeTracker* nudge_tracker,
- sessions::SyncSession* session,
- const base::TimeDelta& new_delay);
-
-ACTION_P(SimulateThrottled, throttle) {
- SimulateThrottledImpl(arg0, throttle);
-}
-
-ACTION_P2(SimulateTypesThrottled, types, throttle) {
- SimulateTypesThrottledImpl(arg0, types, throttle);
-}
-
-ACTION_P(SimulatePollIntervalUpdate, poll) {
- SimulatePollIntervalUpdateImpl(arg0, arg1, poll);
-}
-
-ACTION_P(SimulateSessionsCommitDelayUpdate, poll) {
- SimulateSessionsCommitDelayUpdateImpl(arg0, arg1, arg2, poll);
-}
-
-ACTION_P(SimulateGuRetryDelayCommand, delay) {
- SimulateGuRetryDelayCommandImpl(arg0, delay);
-}
-
-} // namespace test_util
-} // namespace sessions
-} // namespace syncer
-
-#endif // COMPONENTS_SYNC_SESSIONS_IMPL_TEST_UTIL_H_
« no previous file with comments | « components/sync/sessions_impl/sync_session_context.cc ('k') | components/sync/sessions_impl/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698