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

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

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 scoped_ptr<MockRead[]> reads_; 231 scoped_ptr<MockRead[]> reads_;
232 }; 232 };
233 233
234 // Test fixture for write tests. 234 // Test fixture for write tests.
235 class WebSocketBasicStreamSocketWriteTest 235 class WebSocketBasicStreamSocketWriteTest
236 : public WebSocketBasicStreamSocketTest { 236 : public WebSocketBasicStreamSocketTest {
237 protected: 237 protected:
238 // All write tests use the same frame, so it is easiest to create it during 238 // All write tests use the same frame, so it is easiest to create it during
239 // test creation. 239 // test creation.
240 virtual void SetUp() OVERRIDE { PrepareWriteFrame(); } 240 virtual void SetUp() override { PrepareWriteFrame(); }
241 241
242 // Creates a WebSocketFrame with a wire format matching kWriteFrame and adds 242 // Creates a WebSocketFrame with a wire format matching kWriteFrame and adds
243 // it to |frames_|. 243 // it to |frames_|.
244 void PrepareWriteFrame() { 244 void PrepareWriteFrame() {
245 scoped_ptr<WebSocketFrame> frame( 245 scoped_ptr<WebSocketFrame> frame(
246 new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)); 246 new WebSocketFrame(WebSocketFrameHeader::kOpCodeText));
247 const size_t payload_size = 247 const size_t payload_size =
248 kWriteFrameSize - (WebSocketFrameHeader::kBaseHeaderSize + 248 kWriteFrameSize - (WebSocketFrameHeader::kBaseHeaderSize +
249 WebSocketFrameHeader::kMaskingKeyLength); 249 WebSocketFrameHeader::kMaskingKeyLength);
250 frame->data = new IOBuffer(payload_size); 250 frame->data = new IOBuffer(payload_size);
(...skipping 685 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