chromium/components/download/internal/background_service/in_memory_download_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/download/internal/background_service/in_memory_download.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/message_loop/message_pump_type.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "base/uuid.h"
#include "net/base/io_buffer.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "storage/browser/blob/blob_reader.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
NiceMock;

namespace download {
namespace {

const char kTestDownloadData[] =;

MATCHER_P2(InMemoryDownloadMatcher,
           response_headers,
           url_chain,
           "Verify in memory download.") {}

// Dummy callback used for IO_PENDING state in blob operations, this is not
// called when the blob operation is done, but called when chained with other
// IO operations that might return IO_PENDING.
template <typename T>
void SetValue(T* address, T value) {}

// Must run on IO thread task runner.
base::WeakPtr<storage::BlobStorageContext> BlobStorageContextGetter(
    storage::BlobStorageContext* blob_context) {}

class MockDelegate : public InMemoryDownload::Delegate {};

class InMemoryDownloadTest : public testing::Test {};

TEST_F(InMemoryDownloadTest, DownloadTest) {}

TEST_F(InMemoryDownloadTest, RedirectResponseHeaders) {}

}  // namespace

}  // namespace download