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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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_channel_test.cc ('k') | net/websockets/websocket_stream.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 #include "net/websockets/websocket_deflate_predictor_impl.h" 5 #include "net/websockets/websocket_deflate_predictor_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "net/websockets/websocket_frame.h" 10 #include "net/websockets/websocket_frame.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 namespace { 15 namespace {
16 16
17 typedef WebSocketDeflatePredictor::Result Result; 17 typedef WebSocketDeflatePredictor::Result Result;
18 18
19 TEST(WebSocketDeflatePredictorImpl, Predict) { 19 TEST(WebSocketDeflatePredictorImpl, Predict) {
20 WebSocketDeflatePredictorImpl predictor; 20 WebSocketDeflatePredictorImpl predictor;
21 std::vector<std::unique_ptr<WebSocketFrame>> frames; 21 std::vector<std::unique_ptr<WebSocketFrame>> frames;
22 frames.push_back( 22 frames.push_back(
23 base::WrapUnique(new WebSocketFrame(WebSocketFrameHeader::kOpCodeText))); 23 base::MakeUnique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText));
24 Result result = predictor.Predict(frames, 0); 24 Result result = predictor.Predict(frames, 0);
25 25
26 EXPECT_EQ(WebSocketDeflatePredictor::DEFLATE, result); 26 EXPECT_EQ(WebSocketDeflatePredictor::DEFLATE, result);
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 } // namespace net 31 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_channel_test.cc ('k') | net/websockets/websocket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698