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

Side by Side Diff: chrome/test/chromedriver/net/websocket_unittest.cc

Issue 679273002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 run_loop_ = NULL; 72 run_loop_ = NULL;
73 } 73 }
74 74
75 private: 75 private:
76 base::RunLoop* run_loop_; 76 base::RunLoop* run_loop_;
77 }; 77 };
78 78
79 class WebSocketTest : public testing::Test { 79 class WebSocketTest : public testing::Test {
80 public: 80 public:
81 WebSocketTest() {} 81 WebSocketTest() {}
82 virtual ~WebSocketTest() {} 82 ~WebSocketTest() override {}
83 83
84 virtual void SetUp() override { 84 void SetUp() override { ASSERT_TRUE(server_.Start()); }
85 ASSERT_TRUE(server_.Start());
86 }
87 85
88 virtual void TearDown() override { 86 void TearDown() override { server_.Stop(); }
89 server_.Stop();
90 }
91 87
92 protected: 88 protected:
93 scoped_ptr<WebSocket> CreateWebSocket(const GURL& url, 89 scoped_ptr<WebSocket> CreateWebSocket(const GURL& url,
94 WebSocketListener* listener) { 90 WebSocketListener* listener) {
95 int error; 91 int error;
96 scoped_ptr<WebSocket> sock(new WebSocket(url, listener)); 92 scoped_ptr<WebSocket> sock(new WebSocket(url, listener));
97 base::RunLoop run_loop; 93 base::RunLoop run_loop;
98 sock->Connect(base::Bind(&OnConnectFinished, &run_loop, &error)); 94 sock->Connect(base::Bind(&OnConnectFinished, &run_loop, &error));
99 loop_.PostDelayedTask( 95 loop_.PostDelayedTask(
100 FROM_HERE, run_loop.QuitClosure(), 96 FROM_HERE, run_loop.QuitClosure(),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 SendReceive(messages); 196 SendReceive(messages);
201 } 197 }
202 198
203 TEST_F(WebSocketTest, SendReceiveMultiple) { 199 TEST_F(WebSocketTest, SendReceiveMultiple) {
204 std::vector<std::string> messages; 200 std::vector<std::string> messages;
205 messages.push_back("1"); 201 messages.push_back("1");
206 messages.push_back("2"); 202 messages.push_back("2");
207 messages.push_back("3"); 203 messages.push_back("3");
208 SendReceive(messages); 204 SendReceive(messages);
209 } 205 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc ('k') | chrome/test/data/webui/chrome_send_browsertest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698