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

Side by Side Diff: net/websockets/websocket_basic_stream_test.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (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
« no previous file with comments | « net/websockets/websocket_basic_stream.h ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Tests for WebSocketBasicStream. Note that we do not attempt to verify that 5 // Tests for WebSocketBasicStream. Note that we do not attempt to verify that
6 // frame parsing itself functions correctly, as that is covered by the 6 // frame parsing itself functions correctly, as that is covered by the
7 // WebSocketFrameParser tests. 7 // WebSocketFrameParser tests.
8 8
9 #include "net/websockets/websocket_basic_stream.h" 9 #include "net/websockets/websocket_basic_stream.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 class StrictStaticSocketDataProvider : public StaticSocketDataProvider { 83 class StrictStaticSocketDataProvider : public StaticSocketDataProvider {
84 public: 84 public:
85 StrictStaticSocketDataProvider(MockRead* reads, 85 StrictStaticSocketDataProvider(MockRead* reads,
86 size_t reads_count, 86 size_t reads_count,
87 MockWrite* writes, 87 MockWrite* writes,
88 size_t writes_count, 88 size_t writes_count,
89 bool strict_mode) 89 bool strict_mode)
90 : StaticSocketDataProvider(reads, reads_count, writes, writes_count), 90 : StaticSocketDataProvider(reads, reads_count, writes, writes_count),
91 strict_mode_(strict_mode) {} 91 strict_mode_(strict_mode) {}
92 92
93 virtual ~StrictStaticSocketDataProvider() { 93 ~StrictStaticSocketDataProvider() override {
94 if (strict_mode_) { 94 if (strict_mode_) {
95 EXPECT_EQ(read_count(), read_index()); 95 EXPECT_EQ(read_count(), read_index());
96 EXPECT_EQ(write_count(), write_index()); 96 EXPECT_EQ(write_count(), write_index());
97 } 97 }
98 } 98 }
99 99
100 private: 100 private:
101 const bool strict_mode_; 101 const bool strict_mode_;
102 }; 102 };
103 103
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 936
937 TEST_F(WebSocketBasicStreamSocketTest, GetSubProtocolWorks) { 937 TEST_F(WebSocketBasicStreamSocketTest, GetSubProtocolWorks) {
938 sub_protocol_ = "cyberchat"; 938 sub_protocol_ = "cyberchat";
939 CreateNullStream(); 939 CreateNullStream();
940 940
941 EXPECT_EQ("cyberchat", stream_->GetSubProtocol()); 941 EXPECT_EQ("cyberchat", stream_->GetSubProtocol());
942 } 942 }
943 943
944 } // namespace 944 } // namespace
945 } // namespace net 945 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_basic_stream.h ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698