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 "config.h" | 5 #include "config.h" |
6 #include "modules/fetch/Response.h" | 6 #include "modules/fetch/Response.h" |
7 | 7 |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
11 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
12 #include "core/frame/Frame.h" | 12 #include "core/frame/Frame.h" |
13 #include "core/testing/DummyPageHolder.h" | 13 #include "core/testing/DummyPageHolder.h" |
14 #include "modules/fetch/BodyStreamBuffer.h" | 14 #include "modules/fetch/BodyStreamBuffer.h" |
15 #include "modules/fetch/DataConsumerHandleTestUtil.h" | 15 #include "modules/fetch/DataConsumerHandleTestUtil.h" |
16 #include "modules/fetch/DataConsumerHandleUtil.h" | 16 #include "modules/fetch/DataConsumerHandleUtil.h" |
17 #include "modules/fetch/FetchResponseData.h" | 17 #include "modules/fetch/FetchResponseData.h" |
18 #include "platform/blob/BlobData.h" | 18 #include "platform/blob/BlobData.h" |
19 #include "platform/testing/UnitTestHelpers.h" | 19 #include "platform/testing/UnitTestHelpers.h" |
20 #include "public/platform/WebServiceWorkerResponse.h" | 20 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" |
21 #include <gtest/gtest.h> | 21 #include <gtest/gtest.h> |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 namespace { | 24 namespace { |
25 | 25 |
26 PassOwnPtr<WebServiceWorkerResponse> createTestWebServiceWorkerResponse() | 26 PassOwnPtr<WebServiceWorkerResponse> createTestWebServiceWorkerResponse() |
27 { | 27 { |
28 const KURL url(ParsedURLString, "http://www.webresponse.com/"); | 28 const KURL url(ParsedURLString, "http://www.webresponse.com/"); |
29 const unsigned short status = 200; | 29 const unsigned short status = 200; |
30 const String statusText = "the best status text"; | 30 const String statusText = "the best status text"; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 EXPECT_CALL(*client1, didFetchDataLoadFailed()); | 254 EXPECT_CALL(*client1, didFetchDataLoadFailed()); |
255 EXPECT_CALL(*client2, didFetchDataLoadFailed()); | 255 EXPECT_CALL(*client2, didFetchDataLoadFailed()); |
256 | 256 |
257 response->internalBodyBuffer()->startLoading(response->executionContext(), F
etchDataLoader::createLoaderAsString(), client1); | 257 response->internalBodyBuffer()->startLoading(response->executionContext(), F
etchDataLoader::createLoaderAsString(), client1); |
258 clonedResponse->internalBodyBuffer()->startLoading(response->executionContex
t(), FetchDataLoader::createLoaderAsString(), client2); | 258 clonedResponse->internalBodyBuffer()->startLoading(response->executionContex
t(), FetchDataLoader::createLoaderAsString(), client2); |
259 blink::testing::runPendingTasks(); | 259 blink::testing::runPendingTasks(); |
260 } | 260 } |
261 | 261 |
262 } // namespace | 262 } // namespace |
263 } // namespace blink | 263 } // namespace blink |
OLD | NEW |