summaryrefslogtreecommitdiff
path: root/test_http_server.cc
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@chromium.org>2015-06-15 12:53:22 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-17 17:34:39 +0000
commit6a9d3497bcf57b8b9f5765a2909a51c9f8119cd1 (patch)
treee58a2563c900d84f1a5de6ec3ce73c8853a88a5d /test_http_server.cc
parent249fbf5be69e8de37fbac33c1570a58f902b1f6f (diff)
platform2: Fix issues with new version of libchrome
libchrome r334380 has the following breaking changes that need to be fixed: - base::JSONWriter::Write() and base::JSONWriter::WriteWithOptions() take "const base::Value&" instead of "const base::Value*" - base::JSONReader::Read() and base::JSONReader::ReadAndReturnError() return a scoped_ptr<base::Value> instead of base::Value* - base/safe_strerror_posix.h is moved to base/posix/safe_strerror.h - safe_strerror() is now in "base" namespace - StartsWithASCII(), EndsWith(), StringToUpperASCII(), LowerCaseEqualsASCII() are now in "base" namespace - ObserverList<T> is now in "base" namespace - base::PrintTo(base::FilePath) used in gtest is now moved to libchrome-test library and as such, unit test runners need to link to this library now. - crypto::RSAPrivateKey::CreateSensitive() is now removed from //crypto, so some of tests in chromeos-login that used that function had to be changed to use crypto::GenerateRSAKeyPairNSS() directly. - UnixDomanSocket class is now in "base" namespace - Pickle class is now in "base" namespace BUG=chromium:496469 TEST=`./build_packages` CQ-DEPEND=CL:277662 Change-Id: I36e5fbf2e36a92068873ffbd44020c862a3ed9e3 Reviewed-on: https://chromium-review.googlesource.com/277671 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Diffstat (limited to 'test_http_server.cc')
-rw-r--r--test_http_server.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test_http_server.cc b/test_http_server.cc
index 5c85dbff..988599e4 100644
--- a/test_http_server.cc
+++ b/test_http_server.cc
@@ -78,7 +78,7 @@ bool ParseRequest(int fd, HttpRequest* request) {
exit(RC_ERR_READ);
}
headers.append(buf, r);
- } while (!EndsWith(headers, EOL EOL, true));
+ } while (!base::EndsWith(headers, EOL EOL, true));
LOG(INFO) << "got headers:\n--8<------8<------8<------8<----\n"
<< headers
@@ -107,7 +107,7 @@ bool ParseRequest(int fd, HttpRequest* request) {
CHECK_EQ(terms.size(), static_cast<vector<string>::size_type>(2));
string &range = terms[1];
LOG(INFO) << "range attribute: " << range;
- CHECK(StartsWithASCII(range, "bytes=", true) &&
+ CHECK(base::StartsWithASCII(range, "bytes=", true) &&
range.find('-') != string::npos);
request->start_offset = atoll(range.c_str() + strlen("bytes="));
// Decode end offset and increment it by one (so it is non-inclusive).
@@ -491,10 +491,10 @@ void HandleConnection(int fd) {
LOG(INFO) << "pid(" << getpid() << "): handling url " << url;
if (url == "/quitquitquit") {
HandleQuit(fd);
- } else if (StartsWithASCII(url, "/download/", true)) {
+ } else if (base::StartsWithASCII(url, "/download/", true)) {
const UrlTerms terms(url, 2);
HandleGet(fd, request, terms.GetSizeT(1));
- } else if (StartsWithASCII(url, "/flaky/", true)) {
+ } else if (base::StartsWithASCII(url, "/flaky/", true)) {
const UrlTerms terms(url, 5);
HandleGet(fd, request, terms.GetSizeT(1), terms.GetSizeT(2),
terms.GetInt(3), terms.GetInt(4));
@@ -502,7 +502,7 @@ void HandleConnection(int fd) {
HandleRedirect(fd, request);
} else if (url == "/error") {
HandleError(fd, request);
- } else if (StartsWithASCII(url, "/error-if-offset/", true)) {
+ } else if (base::StartsWithASCII(url, "/error-if-offset/", true)) {
const UrlTerms terms(url, 3);
HandleErrorIfOffset(fd, request, terms.GetSizeT(1), terms.GetInt(2));
} else {