| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/cachestorage/Cache.h" | 5 #include "modules/cachestorage/Cache.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 8 #include <memory> |
| 9 #include <string> |
| 7 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptFunction.h" | 11 #include "bindings/core/v8/ScriptFunction.h" |
| 9 #include "bindings/core/v8/ScriptPromise.h" | 12 #include "bindings/core/v8/ScriptPromise.h" |
| 10 #include "bindings/core/v8/ScriptPromiseResolver.h" | 13 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 11 #include "bindings/core/v8/ScriptValue.h" | 14 #include "bindings/core/v8/ScriptValue.h" |
| 12 #include "bindings/core/v8/V8Binding.h" | 15 #include "bindings/core/v8/V8Binding.h" |
| 13 #include "bindings/modules/v8/V8Request.h" | 16 #include "bindings/modules/v8/V8Request.h" |
| 14 #include "bindings/modules/v8/V8Response.h" | 17 #include "bindings/modules/v8/V8Response.h" |
| 15 #include "core/dom/Document.h" | 18 #include "core/dom/Document.h" |
| 16 #include "core/frame/Frame.h" | 19 #include "core/frame/Frame.h" |
| 17 #include "core/testing/DummyPageHolder.h" | 20 #include "core/testing/DummyPageHolder.h" |
| 18 #include "modules/fetch/BodyStreamBuffer.h" | 21 #include "modules/fetch/BodyStreamBuffer.h" |
| 19 #include "modules/fetch/FormDataBytesConsumer.h" | 22 #include "modules/fetch/FormDataBytesConsumer.h" |
| 20 #include "modules/fetch/GlobalFetch.h" | 23 #include "modules/fetch/GlobalFetch.h" |
| 21 #include "modules/fetch/Request.h" | 24 #include "modules/fetch/Request.h" |
| 22 #include "modules/fetch/Response.h" | 25 #include "modules/fetch/Response.h" |
| 23 #include "modules/fetch/ResponseInit.h" | 26 #include "modules/fetch/ResponseInit.h" |
| 24 #include "public/platform/WebURLResponse.h" | 27 #include "public/platform/WebURLResponse.h" |
| 25 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h" | 28 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "wtf/PtrUtil.h" | 30 #include "wtf/PtrUtil.h" |
| 28 #include <algorithm> | |
| 29 #include <memory> | |
| 30 #include <string> | |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 const char kNotImplementedString[] = | 36 const char kNotImplementedString[] = |
| 37 "NotSupportedError: Method is not implemented."; | 37 "NotSupportedError: Method is not implemented."; |
| 38 | 38 |
| 39 class ScopedFetcherForTests final | 39 class ScopedFetcherForTests final |
| 40 : public GarbageCollectedFinalized<ScopedFetcherForTests>, | 40 : public GarbageCollectedFinalized<ScopedFetcherForTests>, |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 | 723 |
| 724 EXPECT_EQ(kNotImplementedString, getRejectString(addResult)); | 724 EXPECT_EQ(kNotImplementedString, getRejectString(addResult)); |
| 725 EXPECT_EQ(1, fetcher->fetchCount()); | 725 EXPECT_EQ(1, fetcher->fetchCount()); |
| 726 EXPECT_EQ("dispatchBatch", | 726 EXPECT_EQ("dispatchBatch", |
| 727 testCache->getAndClearLastErrorWebCacheMethodCalled()); | 727 testCache->getAndClearLastErrorWebCacheMethodCalled()); |
| 728 } | 728 } |
| 729 | 729 |
| 730 } // namespace | 730 } // namespace |
| 731 | 731 |
| 732 } // namespace blink | 732 } // namespace blink |
| OLD | NEW |