chromium/net/test/url_request/url_request_test_job_backed_by_file_unittest.cc

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

#include "net/test/url_request/url_request_test_job_backed_by_file.h"
#include "base/memory/raw_ptr.h"

#include <memory>

#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/filename_util.h"
#include "net/base/net_errors.h"
#include "net/test/test_with_task_environment.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/url_constants.h"

namespace net {

namespace {

// A URLRequestTestJobBackedByFile for testing values passed to OnSeekComplete
// and OnReadComplete.
class TestURLRequestTestJobBackedByFile : public URLRequestTestJobBackedByFile {};

// A simple holder for start/end used in http range requests.
struct Range {};

// A superclass for tests of the OnReadComplete / OnSeekComplete /
// OnReadComplete functions of URLRequestTestJobBackedByFile.
class URLRequestTestJobBackedByFileEventsTest : public TestWithTaskEnvironment {};

URLRequestTestJobBackedByFileEventsTest::
    URLRequestTestJobBackedByFileEventsTest()
    :{}

void URLRequestTestJobBackedByFileEventsTest::TearDown() {}

void URLRequestTestJobBackedByFileEventsTest::RunSuccessfulRequestWithString(
    const std::string& content,
    const Range* range) {}

void URLRequestTestJobBackedByFileEventsTest::RunSuccessfulRequestWithString(
    const std::string& raw_content,
    const std::string& expected_content,
    const base::FilePath::StringPieceType& file_extension,
    const Range* range) {}

void URLRequestTestJobBackedByFileEventsTest::RunRequestWithPath(
    const base::FilePath& path,
    const std::string& range,
    int* open_result,
    int64_t* seek_position,
    bool* done_reading,
    std::string* observed_content) {}

// Helper function to make a character array filled with |size| bytes of
// test content.
std::string MakeContentOfSize(int size) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, ZeroByteFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, TinyFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, SmallFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, BigFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, Range) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, DecodeSvgzFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, OpenNonExistentFile) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, MultiRangeRequestNotSupported) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, RangeExceedingFileSize) {}

TEST_F(URLRequestTestJobBackedByFileEventsTest, IgnoreRangeParsingError) {}

}  // namespace

}  // namespace net