#include "chrome/updater/net/fallback_net_fetcher.h"
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "base/containers/flat_map.h"
#include "base/files/file_path.h"
#include "base/test/bind.h"
#include "components/update_client/network.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace updater {
namespace {
class FakeFetcher : public update_client::NetworkFetcher { … };
std::unique_ptr<FakeFetcher> MakeFakeFetcherForPost(
base::OnceCallback<int(void)> error_supplier) { … }
std::unique_ptr<FakeFetcher> MakeFakeFetcherForDownload(
base::OnceCallback<int(void)> error_supplier) { … }
}
TEST(FallbackNetFetcher, NoFallbackOnSuccess_Post) { … }
TEST(FallbackNetFetcher, NoFallbackOnSuccess_Download) { … }
TEST(FallbackNetFetcher, FallbackOnFailure_Post) { … }
TEST(FallbackNetFetcher, FallbackOnFailure_Download) { … }
TEST(FallbackNetFetcher, NoCrashOnNullptr_Post) { … }
TEST(FallbackNetFetcher, NoCrashOnNullptr_Download) { … }
}