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

Side by Side Diff: net/spdy/spdy_write_queue_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream_test_util.cc ('k') | net/ssl/server_bound_cert_service.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/spdy/spdy_write_queue.h" 5 #include "net/spdy/spdy_write_queue.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <cstring> 8 #include <cstring>
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 int ProducerToInt(scoped_ptr<SpdyFrameProducer> producer) { 53 int ProducerToInt(scoped_ptr<SpdyFrameProducer> producer) {
54 int i = 0; 54 int i = 0;
55 EXPECT_TRUE(base::StringToInt(ProducerToString(producer.Pass()), &i)); 55 EXPECT_TRUE(base::StringToInt(ProducerToString(producer.Pass()), &i));
56 return i; 56 return i;
57 } 57 }
58 58
59 // Makes a SpdyStream with the given priority and a NULL SpdySession 59 // Makes a SpdyStream with the given priority and a NULL SpdySession
60 // -- be careful to not call any functions that expect the session to 60 // -- be careful to not call any functions that expect the session to
61 // be there. 61 // be there.
62 SpdyStream* MakeTestStream(RequestPriority priority) { 62 SpdyStream* MakeTestStream(RequestPriority priority) {
63 return new SpdyStream(NULL, "", priority, 0, 0, false, BoundNetLog()); 63 return new SpdyStream(
64 NULL, std::string(), priority, 0, 0, false, BoundNetLog());
64 } 65 }
65 66
66 // Add some frame producers of different priority. The producers 67 // Add some frame producers of different priority. The producers
67 // should be dequeued in priority order with their associated stream. 68 // should be dequeued in priority order with their associated stream.
68 TEST_F(SpdyWriteQueueTest, DequeuesByPriority) { 69 TEST_F(SpdyWriteQueueTest, DequeuesByPriority) {
69 SpdyWriteQueue write_queue; 70 SpdyWriteQueue write_queue;
70 71
71 scoped_ptr<SpdyFrameProducer> producer_low = StringToProducer("LOW"); 72 scoped_ptr<SpdyFrameProducer> producer_low = StringToProducer("LOW");
72 scoped_ptr<SpdyFrameProducer> producer_medium = StringToProducer("MEDIUM"); 73 scoped_ptr<SpdyFrameProducer> producer_medium = StringToProducer("MEDIUM");
73 scoped_ptr<SpdyFrameProducer> producer_highest = StringToProducer("HIGHEST"); 74 scoped_ptr<SpdyFrameProducer> producer_highest = StringToProducer("HIGHEST");
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 write_queue.Clear(); 175 write_queue.Clear();
175 176
176 scoped_ptr<SpdyFrameProducer> frame_producer; 177 scoped_ptr<SpdyFrameProducer> frame_producer;
177 scoped_refptr<SpdyStream> stream; 178 scoped_refptr<SpdyStream> stream;
178 EXPECT_FALSE(write_queue.Dequeue(&frame_producer, &stream)); 179 EXPECT_FALSE(write_queue.Dequeue(&frame_producer, &stream));
179 } 180 }
180 181
181 } 182 }
182 183
183 } // namespace net 184 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_test_util.cc ('k') | net/ssl/server_bound_cert_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698