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

Side by Side Diff: components/copresence/rpc/http_post_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/copresence/rpc/http_post.h" 5 #include "components/copresence/rpc/http_post.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "components/copresence/proto/data.pb.h" 8 #include "components/copresence/proto/data.pb.h"
9 #include "net/base/url_util.h" 9 #include "net/base/url_util.h"
10 #include "net/http/http_status_code.h" 10 #include "net/http/http_status_code.h"
(...skipping 17 matching lines...) Expand all
28 28
29 class HttpPostTest : public testing::Test { 29 class HttpPostTest : public testing::Test {
30 public: 30 public:
31 HttpPostTest() 31 HttpPostTest()
32 : received_response_code_(0) { 32 : received_response_code_(0) {
33 context_getter_ = new net::TestURLRequestContextGetter( 33 context_getter_ = new net::TestURLRequestContextGetter(
34 make_scoped_refptr(new base::TestSimpleTaskRunner)); 34 make_scoped_refptr(new base::TestSimpleTaskRunner));
35 proto_.set_client("test_client"); 35 proto_.set_client("test_client");
36 proto_.set_version_code(123); 36 proto_.set_version_code(123);
37 } 37 }
38 virtual ~HttpPostTest() {} 38 ~HttpPostTest() override {}
39 39
40 // Record the response sent back to the client for verification. 40 // Record the response sent back to the client for verification.
41 void TestResponseCallback(int response_code, 41 void TestResponseCallback(int response_code,
42 const std::string& response) { 42 const std::string& response) {
43 received_response_code_ = response_code; 43 received_response_code_ = response_code;
44 received_response_ = response; 44 received_response_ = response;
45 } 45 }
46 46
47 protected: 47 protected:
48 bool ResponsePassedThrough(int response_code, const std::string& response) { 48 bool ResponsePassedThrough(int response_code, const std::string& response) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 TEST_F(HttpPostTest, ErrorResponse) { 133 TEST_F(HttpPostTest, ErrorResponse) {
134 EXPECT_TRUE(ResponsePassedThrough( 134 EXPECT_TRUE(ResponsePassedThrough(
135 net::HTTP_BAD_REQUEST, "Bad client. Shame on you.")); 135 net::HTTP_BAD_REQUEST, "Bad client. Shame on you."));
136 EXPECT_TRUE(ResponsePassedThrough( 136 EXPECT_TRUE(ResponsePassedThrough(
137 net::HTTP_INTERNAL_SERVER_ERROR, "I'm dying. Forgive me.")); 137 net::HTTP_INTERNAL_SERVER_ERROR, "I'm dying. Forgive me."));
138 EXPECT_TRUE(ResponsePassedThrough(-1, "")); 138 EXPECT_TRUE(ResponsePassedThrough(-1, ""));
139 } 139 }
140 140
141 } // namespace copresence 141 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/mediums/audio/audio_recorder_unittest.cc ('k') | components/crash/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698