chromium/chrome/browser/safe_browsing/cloud_content_scanning/multipart_uploader_unittest.cc

// Copyright 2019 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/safe_browsing/cloud_content_scanning/multipart_uploader.h"

#include <memory>

#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/enterprise/connectors/test/uploader_test_utils.h"
#include "components/file_access/test/mock_scoped_file_access_delegate.h"
#include "content/public/test/browser_task_environment.h"
#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/cpp/resource_request.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace safe_browsing {

_;
Invoke;

class MultipartUploadRequestTest : public testing::Test {};

class MockMultipartUploadRequest : public MultipartUploadRequest {};

class MockMultipartUploadDataPipeRequest : public MultipartUploadRequest {};

TEST_F(MultipartUploadRequestTest, GeneratesCorrectBody) {}

TEST_F(MultipartUploadRequestTest, RetriesCorrectly) {}

class MultipartUploadDataPipeRequestTest
    : public MultipartUploadRequestTest,
      public testing::WithParamInterface<bool> {};

INSTANTIATE_TEST_SUITE_P();

// Disabled due to flakiness on Windows https://crbug.com/1286638
#if BUILDFLAG(IS_WIN)
#define MAYBE_Retries
#else
#define MAYBE_Retries
#endif
TEST_P(MultipartUploadDataPipeRequestTest, MAYBE_Retries) {}

TEST_P(MultipartUploadDataPipeRequestTest, DataControls) {}

TEST_P(MultipartUploadDataPipeRequestTest, EquivalentToStringRequest) {}

TEST_F(MultipartUploadRequestTest, GeneratesCorrectHeaders_StringRequest) {}

TEST_F(MultipartUploadRequestTest, GeneratesCorrectHeaders_FileRequest) {}

TEST_F(MultipartUploadRequestTest, GeneratesCorrectHeaders_PageRequest) {}

}  // namespace safe_browsing