#include "components/update_client/request_sender.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/update_client/net/url_loader_post_interceptor.h"
#include "components/update_client/persisted_data.h"
#include "components/update_client/test_configurator.h"
#include "components/update_client/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace update_client {
namespace {
constexpr char kUrl1[] = …;
constexpr char kUrl2[] = …;
}
class RequestSenderTest : public testing::Test,
public ::testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
RequestSenderTest::RequestSenderTest()
: … { … }
RequestSenderTest::~RequestSenderTest() = default;
void RequestSenderTest::SetUp() { … }
void RequestSenderTest::TearDown() { … }
void RequestSenderTest::RunThreads() { … }
void RequestSenderTest::Quit() { … }
void RequestSenderTest::RequestSenderComplete(int error,
const std::string& response,
int retry_after_sec) { … }
TEST_P(RequestSenderTest, RequestSendSuccess) { … }
TEST_F(RequestSenderTest, RequestSendSuccessWithFallback) { … }
TEST_F(RequestSenderTest, RequestSendFailed) { … }
TEST_F(RequestSenderTest, RequestSendFailedNoUrls) { … }
TEST_F(RequestSenderTest, RequestSendCupError) { … }
}