#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
#include <stdint.h>
#include <algorithm>
#include <string>
#include <utility>
#include "base/containers/contains.h"
#include "base/containers/heap_array.h"
#include "base/format_macros.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "media/base/media_log.h"
#include "media/base/seekable_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_network_state_notifier.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/renderer/platform/media/testing/mock_resource_fetch_context.h"
#include "third_party/blink/renderer/platform/media/testing/mock_web_associated_url_loader.h"
#include "third_party/blink/renderer/platform/media/url_index.h"
namespace blink {
_;
Invoke;
NiceMock;
Truly;
const char kHttpUrl[] = …;
const char kHttpRedirect[] = …;
const char kEtag[] = …;
const int kDataSize = …;
const int kHttpOK = …;
const int kHttpPartialContent = …;
enum NetworkState { … };
static bool CorrectAcceptEncoding(const WebURLRequest& request) { … }
class ResourceMultiBufferDataProviderTest : public testing::Test { … };
TEST_F(ResourceMultiBufferDataProviderTest, StartStop) { … }
TEST_F(ResourceMultiBufferDataProviderTest, BadHttpResponse) { … }
TEST_F(ResourceMultiBufferDataProviderTest, NotPartialResponse) { … }
TEST_F(ResourceMultiBufferDataProviderTest, FullResponse) { … }
TEST_F(ResourceMultiBufferDataProviderTest, PartialResponse) { … }
TEST_F(ResourceMultiBufferDataProviderTest, PartialResponse_Chunked) { … }
TEST_F(ResourceMultiBufferDataProviderTest, PartialResponse_NoAcceptRanges) { … }
TEST_F(ResourceMultiBufferDataProviderTest,
PartialResponse_ChunkedNoAcceptRanges) { … }
TEST_F(ResourceMultiBufferDataProviderTest, InvalidPartialResponse) { … }
TEST_F(ResourceMultiBufferDataProviderTest, TestRedirects) { … }
TEST_F(ResourceMultiBufferDataProviderTest, TestRedirectedPartialResponse) { … }
}