OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebURLLoaderTestDelegate_h |
| 6 #define WebURLLoaderTestDelegate_h |
| 7 |
| 8 #include "public/platform/WebCommon.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class WebURLLoader; |
| 13 class WebURLResponse; |
| 14 class WebURLLoaderClient; |
| 15 struct WebURLError; |
| 16 |
| 17 // Use with WebUnitTestSupport::setLoaderDelegate to intercept calls to a |
| 18 // WebURLLoaderClient for controlling network responses in a test. Default |
| 19 // implementations of all methods just call the original method on the |
| 20 // WebURLLoaderClient. |
| 21 class BLINK_PLATFORM_EXPORT WebURLLoaderTestDelegate { |
| 22 public: |
| 23 WebURLLoaderTestDelegate(); |
| 24 virtual ~WebURLLoaderTestDelegate(); |
| 25 |
| 26 virtual void didReceiveResponse(WebURLLoaderClient* originalClient, WebURLLo
ader*, const WebURLResponse&); |
| 27 virtual void didReceiveData(WebURLLoaderClient* originalClient, WebURLLoader
*, const char* data, int dataLength, int encodedDataLength); |
| 28 virtual void didFail(WebURLLoaderClient* originalClient, WebURLLoader*, cons
t WebURLError&); |
| 29 virtual void didFinishLoading(WebURLLoaderClient* originalClient, WebURLLoad
er*, double finishTime, int64_t totalEncodedDataLength); |
| 30 }; |
| 31 |
| 32 } // namespace blink |
| 33 |
| 34 #endif |
OLD | NEW |