#include "third_party/blink/renderer/modules/cache_storage/cache.h"
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "services/network/public/mojom/fetch_api.mojom-blink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_request.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_request_init.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_response.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_response_init.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_request_usvstring.h"
#include "third_party/blink/renderer/core/dom/abort_controller.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/fetch/body_stream_buffer.h"
#include "third_party/blink/renderer/core/fetch/form_data_bytes_consumer.h"
#include "third_party/blink/renderer/core/fetch/global_fetch.h"
#include "third_party/blink/renderer/core/fetch/request.h"
#include "third_party/blink/renderer/core/fetch/response.h"
#include "third_party/blink/renderer/core/frame/frame.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/modules/cache_storage/cache_storage_blob_client_list.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
CacheStorageError;
CacheStorageVerboseError;
namespace blink {
namespace {
const char kNotImplementedString[] = …;
class ScopedFetcherForTests final
: public GarbageCollected<ScopedFetcherForTests>,
public GlobalFetch::ScopedFetcher { … };
class ErrorCacheForTests : public mojom::blink::CacheStorageCache { … };
class NotImplementedErrorCache : public ErrorCacheForTests { … };
class TestCache : public Cache { … };
class CacheStorageTest : public PageTestBase { … };
V8RequestInfo* RequestToRequestInfo(Request* value) { … }
V8RequestInfo* StringToRequestInfo(const String& value) { … }
TEST_F(CacheStorageTest, Basics) { … }
TEST_F(CacheStorageTest, BasicArguments) { … }
TEST_F(CacheStorageTest, BatchOperationArguments) { … }
class MatchTestCache : public NotImplementedErrorCache { … };
TEST_F(CacheStorageTest, MatchResponseTest) { … }
class KeysTestCache : public NotImplementedErrorCache { … };
TEST_F(CacheStorageTest, KeysResponseTest) { … }
class MatchAllAndBatchTestCache : public NotImplementedErrorCache { … };
TEST_F(CacheStorageTest, MatchAllAndBatchResponseTest) { … }
TEST_F(CacheStorageTest, Add) { … }
TEST_F(CacheStorageTest, AddAllAbortOne) { … }
TEST_F(CacheStorageTest, AddAllAbortMany) { … }
}
}