chromium/components/sync/engine/net/sync_server_connection_manager_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync/engine/net/sync_server_connection_manager.h"

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "components/sync/engine/cancelation_signal.h"
#include "components/sync/engine/net/http_post_provider.h"
#include "components/sync/engine/net/http_post_provider_factory.h"
#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace syncer {
namespace {

class BlockingHttpPost : public HttpPostProvider {};

class BlockingHttpPostFactory : public HttpPostProviderFactory {};

}  // namespace

// Ask the ServerConnectionManager to stop before it is created.
TEST(SyncServerConnectionManagerTest, VeryEarlyAbortPost) {}

// Ask the ServerConnectionManager to stop before its first request is made.
TEST(SyncServerConnectionManagerTest, EarlyAbortPost) {}

// Ask the ServerConnectionManager to stop during a request.
TEST(SyncServerConnectionManagerTest, AbortPost) {}

namespace {

class FailingHttpPost : public HttpPostProvider {};

class FailingHttpPostFactory : public HttpPostProviderFactory {};

}  // namespace

// Fail request with TIMED_OUT error. Make sure server status is
// CONNECTION_UNAVAILABLE and therefore request will be retried after network
// change.
TEST(SyncServerConnectionManagerTest, FailPostWithTimedOut) {}

}  // namespace syncer