chromium/third_party/blink/renderer/core/fetch/fetch_data_loader_test.cc

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

#include "third_party/blink/renderer/core/fetch/fetch_data_loader.h"

#include <memory>

#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/fetch/bytes_consumer_test_util.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/core/html/forms/form_data.h"
#include "third_party/blink/renderer/platform/blob/testing/fake_blob_registry.h"
#include "third_party/blink/renderer/platform/loader/fetch/data_pipe_bytes_consumer.h"
#include "third_party/blink/renderer/platform/loader/fetch/text_resource_decoder_options.h"
#include "third_party/blink/renderer/platform/loader/testing/bytes_consumer_test_reader.h"
#include "third_party/blink/renderer/platform/loader/testing/replaying_bytes_consumer.h"
#include "third_party/blink/renderer/platform/scheduler/test/fake_task_runner.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

namespace blink {

namespace {

ByMove;
InSequence;
Return;
DoAll;
StrictMock;
_;
SaveArg;
SetArgPointee;
Checkpoint;
MockFetchDataLoaderClient;
MockBytesConsumer;
Result;

constexpr char kQuickBrownFox[] =;
constexpr size_t kQuickBrownFoxLength =;
constexpr size_t kQuickBrownFoxLengthWithTerminatingNull =;
constexpr char kQuickBrownFoxFormData[] =;
constexpr size_t kQuickBrownFoxFormDataLength =;

class FetchDataLoaderTest : public testing::Test {};

class FetchDataLoaderBlobTest : public FetchDataLoaderTest {};

ACTION_P(QUITLOOP, loop) {}

TEST_F(FetchDataLoaderBlobTest, LoadAsBlob) {}

TEST_F(FetchDataLoaderBlobTest, LoadAsBlobFailed) {}

TEST_F(FetchDataLoaderBlobTest, LoadAsBlobCancel) {}

TEST_F(FetchDataLoaderBlobTest, LoadAsBlobNoClientCallbacksAfterCancel) {}

TEST_F(FetchDataLoaderBlobTest,
       LoadAsBlobViaDrainAsBlobDataHandleWithSameContentType) {}

TEST_F(FetchDataLoaderBlobTest,
       LoadAsBlobViaDrainAsBlobDataHandleWithDifferentContentType) {}

TEST_F(FetchDataLoaderTest, LoadAsArrayBuffer) {}

TEST_F(FetchDataLoaderTest, LoadAsArrayBufferFailed) {}

TEST_F(FetchDataLoaderTest, LoadAsArrayBufferCancel) {}

TEST_F(FetchDataLoaderTest, LoadAsFormData) {}

TEST_F(FetchDataLoaderTest, LoadAsFormDataPartialInput) {}

TEST_F(FetchDataLoaderTest, LoadAsFormDataFailed) {}

TEST_F(FetchDataLoaderTest, LoadAsFormDataCancel) {}

TEST_F(FetchDataLoaderTest, LoadAsString) {}

TEST_F(FetchDataLoaderTest, LoadAsStringWithNullBytes) {}

TEST_F(FetchDataLoaderTest, LoadAsStringError) {}

TEST_F(FetchDataLoaderTest, LoadAsStringCancel) {}

TEST_F(FetchDataLoaderTest, LoadAsDataPipeWithCopy) {}

TEST_F(FetchDataLoaderTest, LoadAsDataPipeWithCopyFailure) {}

TEST_F(FetchDataLoaderTest, LoadAsDataPipeFromDataPipe) {}

TEST_F(FetchDataLoaderTest, LoadAsDataPipeFromDataPipeFailure) {}

}  // namespace

}  // namespace blink