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

Unified Diff: chrome/browser/google_apis/drive_api_requests_unittest.cc

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
Index: chrome/browser/google_apis/drive_api_requests_unittest.cc
diff --git a/chrome/browser/google_apis/drive_api_requests_unittest.cc b/chrome/browser/google_apis/drive_api_requests_unittest.cc
index 2e74e6ebde939a74313d491bfa135bf5c7820552..ee9e963dedf6e26b7edd4193dbdce4c11a113833 100644
--- a/chrome/browser/google_apis/drive_api_requests_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_requests_unittest.cc
@@ -150,7 +150,7 @@ class DriveApiRequestsTest : public testing::Test {
// Return the response with just "204 No Content" status code.
scoped_ptr<net::test_server::BasicHttpResponse> http_response(
new net::test_server::BasicHttpResponse);
- http_response->set_code(net::test_server::NO_CONTENT);
+ http_response->set_code(net::HTTP_NO_CONTENT);
return http_response.PassAs<net::test_server::HttpResponse>();
}
@@ -198,7 +198,7 @@ class DriveApiRequestsTest : public testing::Test {
if (found != request.headers.end() &&
found->second != "*" &&
found->second != kTestETag) {
- response->set_code(net::test_server::PRECONDITION);
+ response->set_code(net::HTTP_PRECONDITION_FAILED);
return response.PassAs<net::test_server::HttpResponse>();
}
@@ -211,7 +211,7 @@ class DriveApiRequestsTest : public testing::Test {
}
received_bytes_ = 0;
- response->set_code(net::test_server::SUCCESS);
+ response->set_code(net::HTTP_OK);
response->AddCustomHeader(
"Location",
test_server_.base_url().Resolve(expected_upload_path_).spec());
@@ -256,7 +256,7 @@ class DriveApiRequestsTest : public testing::Test {
scoped_ptr<net::test_server::BasicHttpResponse> response(
new net::test_server::BasicHttpResponse);
// Set RESUME INCOMPLETE (308) status code.
- response->set_code(net::test_server::RESUME_INCOMPLETE);
+ response->set_code(static_cast<net::HttpStatusCode>(308));
// Add Range header to the response, based on the values of
// Content-Range header in the request.
@@ -277,7 +277,7 @@ class DriveApiRequestsTest : public testing::Test {
// The response code is CREATED if it is new file uploading.
if (http_request_.relative_url == kTestUploadNewFilePath) {
- response->set_code(net::test_server::CREATED);
+ response->set_code(net::HTTP_CREATED);
}
return response.PassAs<net::test_server::HttpResponse>();
@@ -298,7 +298,7 @@ class DriveApiRequestsTest : public testing::Test {
scoped_ptr<net::test_server::BasicHttpResponse> response(
new net::test_server::BasicHttpResponse);
- response->set_code(net::test_server::SUCCESS);
+ response->set_code(net::HTTP_OK);
response->set_content_type(expected_content_type_);
response->set_content(expected_content_);
return response.PassAs<net::test_server::HttpResponse>();
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/google_apis/gdata_wapi_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698