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

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

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "chrome/test/chromedriver/net/sync_websocket_impl.h" 15 #include "chrome/test/chromedriver/net/sync_websocket_impl.h"
16 #include "chrome/test/chromedriver/net/test_http_server.h" 16 #include "chrome/test/chromedriver/net/test_http_server.h"
17 #include "chrome/test/chromedriver/net/url_request_context_getter.h" 17 #include "chrome/test/chromedriver/net/url_request_context_getter.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace { 21 namespace {
22 22
23 class SyncWebSocketImplTest : public testing::Test { 23 class SyncWebSocketImplTest : public testing::Test {
24 protected: 24 protected:
25 SyncWebSocketImplTest() 25 SyncWebSocketImplTest()
26 : client_thread_("ClientThread"), 26 : client_thread_("ClientThread"),
27 long_timeout_(base::TimeDelta::FromMinutes(1)) {} 27 long_timeout_(base::TimeDelta::FromMinutes(1)) {}
28 virtual ~SyncWebSocketImplTest() {} 28 virtual ~SyncWebSocketImplTest() {}
29 29
30 virtual void SetUp() OVERRIDE { 30 virtual void SetUp() override {
31 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); 31 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
32 ASSERT_TRUE(client_thread_.StartWithOptions(options)); 32 ASSERT_TRUE(client_thread_.StartWithOptions(options));
33 context_getter_ = new URLRequestContextGetter( 33 context_getter_ = new URLRequestContextGetter(
34 client_thread_.message_loop_proxy()); 34 client_thread_.message_loop_proxy());
35 ASSERT_TRUE(server_.Start()); 35 ASSERT_TRUE(server_.Start());
36 } 36 }
37 37
38 virtual void TearDown() OVERRIDE { 38 virtual void TearDown() override {
39 server_.Stop(); 39 server_.Stop();
40 } 40 }
41 41
42 base::Thread client_thread_; 42 base::Thread client_thread_;
43 TestHttpServer server_; 43 TestHttpServer server_;
44 scoped_refptr<URLRequestContextGetter> context_getter_; 44 scoped_refptr<URLRequestContextGetter> context_getter_;
45 const base::TimeDelta long_timeout_; 45 const base::TimeDelta long_timeout_;
46 }; 46 };
47 47
48 } // namespace 48 } // namespace
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ASSERT_TRUE(sock.Connect(server_.web_socket_url())); 157 ASSERT_TRUE(sock.Connect(server_.web_socket_url()));
158 ASSERT_FALSE(sock.HasNextMessage()); 158 ASSERT_FALSE(sock.HasNextMessage());
159 ASSERT_TRUE(sock.Send("3")); 159 ASSERT_TRUE(sock.Send("3"));
160 std::string message; 160 std::string message;
161 ASSERT_EQ( 161 ASSERT_EQ(
162 SyncWebSocket::kOk, 162 SyncWebSocket::kOk,
163 sock.ReceiveNextMessage(&message, long_timeout_)); 163 sock.ReceiveNextMessage(&message, long_timeout_));
164 ASSERT_STREQ("3", message.c_str()); 164 ASSERT_STREQ("3", message.c_str());
165 ASSERT_FALSE(sock.HasNextMessage()); 165 ASSERT_FALSE(sock.HasNextMessage());
166 } 166 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/net/sync_websocket_impl.h ('k') | chrome/test/chromedriver/net/test_http_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698