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: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc

Issue 616603004: Replacing the OVERRIDE with override and FINAL with final in content/browser/renderer_host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/renderer_host/websocket_dispatcher_host.h" 5 #include "content/browser/renderer_host/websocket_dispatcher_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 // A mock of WebsocketHost which records received messages. 30 // A mock of WebsocketHost which records received messages.
31 class MockWebSocketHost : public WebSocketHost { 31 class MockWebSocketHost : public WebSocketHost {
32 public: 32 public:
33 MockWebSocketHost(int routing_id, 33 MockWebSocketHost(int routing_id,
34 WebSocketDispatcherHost* dispatcher, 34 WebSocketDispatcherHost* dispatcher,
35 net::URLRequestContext* url_request_context, 35 net::URLRequestContext* url_request_context,
36 WebSocketDispatcherHostTest* owner); 36 WebSocketDispatcherHostTest* owner);
37 37
38 virtual ~MockWebSocketHost() {} 38 virtual ~MockWebSocketHost() {}
39 39
40 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { 40 virtual bool OnMessageReceived(const IPC::Message& message) override {
41 received_messages_.push_back(message); 41 received_messages_.push_back(message);
42 return true; 42 return true;
43 } 43 }
44 44
45 virtual void GoAway() OVERRIDE; 45 virtual void GoAway() override;
46 46
47 std::vector<IPC::Message> received_messages_; 47 std::vector<IPC::Message> received_messages_;
48 base::WeakPtr<WebSocketDispatcherHostTest> owner_; 48 base::WeakPtr<WebSocketDispatcherHostTest> owner_;
49 }; 49 };
50 50
51 class WebSocketDispatcherHostTest : public ::testing::Test { 51 class WebSocketDispatcherHostTest : public ::testing::Test {
52 public: 52 public:
53 WebSocketDispatcherHostTest() 53 WebSocketDispatcherHostTest()
54 : weak_ptr_factory_(this) { 54 : weak_ptr_factory_(this) {
55 dispatcher_host_ = new WebSocketDispatcherHost( 55 dispatcher_host_ = new WebSocketDispatcherHost(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ASSERT_EQ(2u, gone_hosts_.size()); 210 ASSERT_EQ(2u, gone_hosts_.size());
211 // The gone_hosts_ ordering is not predictable because it depends on the 211 // The gone_hosts_ ordering is not predictable because it depends on the
212 // hash_map ordering. 212 // hash_map ordering.
213 std::sort(gone_hosts_.begin(), gone_hosts_.end()); 213 std::sort(gone_hosts_.begin(), gone_hosts_.end());
214 EXPECT_EQ(123, gone_hosts_[0]); 214 EXPECT_EQ(123, gone_hosts_[0]);
215 EXPECT_EQ(456, gone_hosts_[1]); 215 EXPECT_EQ(456, gone_hosts_[1]);
216 } 216 }
217 217
218 } // namespace 218 } // namespace
219 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/websocket_dispatcher_host.h ('k') | content/browser/renderer_host/websocket_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698