| Index: chrome/browser/sync/sessions/test_util.h
|
| diff --git a/chrome/browser/sync/sessions/test_util.h b/chrome/browser/sync/sessions/test_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..94fc37805b199cf4238f791dfe319d951aadc9c5
|
| --- /dev/null
|
| +++ b/chrome/browser/sync/sessions/test_util.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright (c) 2010 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 CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
|
| +#define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/browser/sync/sessions/sync_session.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace browser_sync {
|
| +namespace sessions {
|
| +namespace test_util {
|
| +
|
| +void SimulateHasMoreToSync(sessions::SyncSession* session) {
|
| + session->status_controller()->update_conflicts_resolved(true);
|
| + ASSERT_TRUE(session->HasMoreToSync());
|
| +}
|
| +
|
| +void SimulateDownloadUpdatesFailed(sessions::SyncSession* session) {
|
| +
|
| +}
|
| +
|
| +void SimulateCommitFailed(sessions::SyncSession* session) {
|
| +
|
| +}
|
| +
|
| +void SimulateSuccess(sessions::SyncSession* session) {
|
| + ASSERT_FALSE(session->HasMoreToSync());
|
| + ASSERT_EQ(0, session->status_controller()->num_server_changes_remaining());
|
| + ASSERT_EQ(0, session->status_controller()->unsynced_handles().size());
|
| +}
|
| +
|
| +void SimulateThrottled(sessions::SyncSession* session) {
|
| +
|
| +}
|
| +
|
| +void SimulatePollIntervalUpdate(sessions::SyncSession* session) {
|
| +
|
| +}
|
| +
|
| +} // namespace test_util
|
| +} // namespace sessions
|
| +} // namespace browser_sync
|
| +
|
| +#endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
|
|
|