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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h

Issue 2485203005: [NaCl SDK] Refactor FakeURLRequestInfoResource, FakeURLResponseInfoResource, and GetHeaderValue (Closed)
Patch Set: Created 4 years, 1 month 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
Index: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h
index 6713988be2ad1313f50c2df386480e9460cfaf9e..545d9e4d21869a92d3f2228bacea1827033a6356 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_util.h
@@ -40,6 +40,29 @@ class FakeHtml5FsResource : public FakeResource {
FakeFilesystem* filesystem_template; // Weak reference.
};
+class FakeURLRequestInfoResource : public FakeResource {
+ public:
+ FakeURLRequestInfoResource() {}
+ static const char* classname() { return "FakeURLRequestInfoResource"; }
+
+ std::string url;
+ std::string method;
+ std::string headers;
+};
+
+class FakeURLResponseInfoResource : public FakeResource {
+ public:
+ FakeURLResponseInfoResource() : status_code(0) {}
+ static const char* classname() { return "FakeURLResponseInfoResource"; }
+
+ int status_code;
+ std::string url;
+ std::string headers;
+};
+
int32_t RunCompletionCallback(PP_CompletionCallback* callback, int32_t result);
+bool GetHeaderValue(const std::string& headers,
+ const std::string& key,
+ std::string* out_value);
#endif // LIBRARIES_NACL_IO_TEST_FAKE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698