Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: public/platform/WebURLLoaderTestDelegate.h

Issue 1303953003: Expand the interface to WebURLLoaderTestDelegate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing files. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/exported/WebURLLoaderTestDelegate.cpp ('k') | public/platform/WebUnitTestSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebURLLoaderTestDelegate.h
diff --git a/public/platform/WebURLLoaderTestDelegate.h b/public/platform/WebURLLoaderTestDelegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..200ab15b0fbd5c78747d88cfcbd328aeddc37fbb
--- /dev/null
+++ b/public/platform/WebURLLoaderTestDelegate.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebURLLoaderTestDelegate_h
+#define WebURLLoaderTestDelegate_h
+
+#include "public/platform/WebCommon.h"
+
+namespace blink {
+
+class WebURLLoader;
+class WebURLResponse;
+class WebURLLoaderClient;
+struct WebURLError;
+
+// Use with WebUnitTestSupport::setLoaderDelegate to intercept calls to a
+// WebURLLoaderClient for controlling network responses in a test. Default
+// implementations of all methods just call the original method on the
+// WebURLLoaderClient.
+class BLINK_PLATFORM_EXPORT WebURLLoaderTestDelegate {
+public:
+ WebURLLoaderTestDelegate();
+ virtual ~WebURLLoaderTestDelegate();
+
+ virtual void didReceiveResponse(WebURLLoaderClient* originalClient, WebURLLoader*, const WebURLResponse&);
+ virtual void didReceiveData(WebURLLoaderClient* originalClient, WebURLLoader*, const char* data, int dataLength, int encodedDataLength);
+ virtual void didFail(WebURLLoaderClient* originalClient, WebURLLoader*, const WebURLError&);
+ virtual void didFinishLoading(WebURLLoaderClient* originalClient, WebURLLoader*, double finishTime, int64_t totalEncodedDataLength);
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/platform/exported/WebURLLoaderTestDelegate.cpp ('k') | public/platform/WebUnitTestSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698