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

Unified Diff: Source/web/tests/sim/SimRequest.h

Issue 1313013005: Add a test that we resume commits after inserting the body. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: dcheng@ review 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/web/tests/sim/SimNetwork.cpp ('k') | Source/web/tests/sim/SimRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/sim/SimRequest.h
diff --git a/Source/web/tests/sim/SimRequest.h b/Source/web/tests/sim/SimRequest.h
new file mode 100644
index 0000000000000000000000000000000000000000..42ba0fe6b398102c86bf15b4c558cf793277d30a
--- /dev/null
+++ b/Source/web/tests/sim/SimRequest.h
@@ -0,0 +1,48 @@
+// 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 SimRequest_h
+#define SimRequest_h
+
+#include "public/platform/WebURLError.h"
+#include "public/platform/WebURLResponse.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class SimNetwork;
+class WebURLLoader;
+class WebURLLoaderClient;
+
+class SimRequest {
+public:
+ SimRequest(String url, String mimeType);
+
+ void didReceiveResponse(WebURLLoaderClient*, WebURLLoader*, const WebURLResponse&);
+ void didFail(const WebURLError&);
+
+ void start();
+ void write(const String& data);
+ void finish();
+
+ bool isReady() const { return m_isReady; }
+ const String& url() const { return m_url; }
+ const WebURLError& error() const { return m_error; }
+ const WebURLResponse& response() const { return m_response; }
+
+ void reset();
+
+private:
+ String m_url;
+ WebURLLoader* m_loader;
+ WebURLResponse m_response;
+ WebURLError m_error;
+ WebURLLoaderClient* m_client;
+ unsigned m_totalEncodedDataLength;
+ bool m_isReady;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/web/tests/sim/SimNetwork.cpp ('k') | Source/web/tests/sim/SimRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698