#ifdef UNSAFE_BUFFERS_BUILD
#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.") { … }
template <typename T>
void SetValue(T* address, T value) { … }
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) { … }
}
}