chromium/chrome/browser/policy/messaging_layer/upload/file_upload_job_unittest.cc

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

#include "chrome/browser/policy/messaging_layer/upload/file_upload_job.h"

#include <string>
#include <string_view>
#include <utility>

#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/task_environment.h"
#include "base/types/expected.h"
#include "chrome/browser/policy/messaging_layer/upload/file_upload_job_test_util.h"
#include "components/reporting/proto/synced/upload_tracker.pb.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/test_support_callbacks.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
AllOf;
Between;
Eq;
Ge;
Invoke;
IsEmpty;
Lt;
Property;
StrEq;
StrictMock;

namespace reporting {
namespace {

constexpr char kUploadFileName[] =;
constexpr char kSessionToken[] =;
constexpr char kUploadParameters[] =;
constexpr char kAccessParameters[] =;

class MockFileUploadDelegate : public FileUploadJob::Delegate {};

UploadSettings ComposeUploadSettings(int64_t retry_count = 1) {}

UploadTracker ComposeUploadTracker(int64_t total, int64_t uploaded) {}

::testing::Matcher<UploadSettings> MatchSettings(int64_t retry_count = 1) {}

class FileUploadJobTest : public ::testing::Test {};

TEST_F(FileUploadJobTest, SuccessfulRun) {}

TEST_F(FileUploadJobTest, NoMoreRetries) {}

TEST_F(FileUploadJobTest, FailToInitiate) {}

TEST_F(FileUploadJobTest, FailToInitiateWithMoreRetries) {}

TEST_F(FileUploadJobTest, AlreadyInitiated) {}

TEST_F(FileUploadJobTest, FailToPerformNextStep) {}

TEST_F(FileUploadJobTest, FailToPerformNextStepWithMoreRetries) {}

TEST_F(FileUploadJobTest, FailToFinalize) {}

TEST_F(FileUploadJobTest, FailToFinalizeWithMoreRetries) {}

TEST_F(FileUploadJobTest, IncompleteUpload) {}

TEST_F(FileUploadJobTest, ExcessiveUpload) {}

TEST_F(FileUploadJobTest, BackingUpload) {}

TEST_F(FileUploadJobTest, SuccessfulResumption) {}

TEST_F(FileUploadJobTest, FailToResumeStep) {}

TEST_F(FileUploadJobTest, FailToResumeFinalize) {}

TEST_F(FileUploadJobTest, AttemptToInitiateMultipleJobs) {}

TEST_F(FileUploadJobTest, AttemptToNextStepMultipleJobs) {}

TEST_F(FileUploadJobTest, AttemptToFinalizeMultipleJobs) {}

TEST_F(FileUploadJobTest, MultipleStagesJob) {}

TEST_F(FileUploadJobTest, FailureRegisteringJobWithNoRetries) {}
}  // namespace
}  // namespace reporting