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

Unified Diff: util/net/http_transport_test.cc

Issue 852213004: win: Add implementation of HTTPTransport based on WinHTTP (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@multiproc-impl
Patch Set: %z fix, now all http_transport_test pass Created 5 years, 11 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 | « no previous file | util/net/http_transport_test_server.py » ('j') | util/net/http_transport_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/net/http_transport_test.cc
diff --git a/util/net/http_transport_test.cc b/util/net/http_transport_test.cc
index cd8ebe867ee17a976c7f2717673781316b766c29..8fb8a57df7a1f12ab7350f7778b67df0381b1a7b 100644
--- a/util/net/http_transport_test.cc
+++ b/util/net/http_transport_test.cc
@@ -15,10 +15,12 @@
#include "util/net/http_transport.h"
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <vector>
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
@@ -50,7 +52,17 @@ class HTTPTransportTestFixture : public MultiprocessExec {
request_validator_(request_validator) {
// TODO(rsesek): Use a more robust mechanism to locate testdata
// <https://code.google.com/p/crashpad/issues/detail?id=4>.
+#if defined(OS_POSIX)
SetChildCommand("util/net/http_transport_test_server.py", nullptr);
+#elif defined(OS_WIN)
+ // Explicitly invoke a shell and python so that python can be found in the
+ // path, and run the test script.
+ std::vector<std::string> args;
+ args.push_back("/c");
+ args.push_back("python");
+ args.push_back("util/net/http_transport_test_server.py");
+ SetChildCommand(getenv("COMSPEC"), &args);
+#endif // OS_POSIX
}
const HTTPHeaders& headers() { return headers_; }
@@ -234,7 +246,7 @@ TEST(HTTPTransport, UnchunkedPlainText) {
HTTPHeaders headers;
headers[kContentType] = kTextPlain;
- headers[kContentLength] = base::StringPrintf("%zu", strlen(kTextBody));
+ headers[kContentLength] = base::StringPrintf("%" PRIuS, strlen(kTextBody));
HTTPTransportTestFixture test(headers, body_stream.Pass(), 200,
&UnchunkedPlainText);
« no previous file with comments | « no previous file | util/net/http_transport_test_server.py » ('j') | util/net/http_transport_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698