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

Side by Side Diff: net/http/bidirectional_stream_unittest.cc

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make bi-directional stream unittests enable priority->dependency setting. Created 4 years, 9 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 | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | net/http/http_network_session.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/http/bidirectional_stream.h" 5 #include "net/http/bidirectional_stream.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 private: 290 private:
291 DISALLOW_COPY_AND_ASSIGN(MockTimer); 291 DISALLOW_COPY_AND_ASSIGN(MockTimer);
292 }; 292 };
293 293
294 } // namespace 294 } // namespace
295 295
296 class BidirectionalStreamTest : public testing::TestWithParam<bool> { 296 class BidirectionalStreamTest : public testing::TestWithParam<bool> {
297 public: 297 public:
298 BidirectionalStreamTest() 298 BidirectionalStreamTest()
299 : spdy_util_(kProtoHTTP2, false), 299 : spdy_util_(kProtoHTTP2, true),
300 session_deps_(kProtoHTTP2), 300 session_deps_(kProtoHTTP2),
301 ssl_data_(SSLSocketDataProvider(ASYNC, OK)) { 301 ssl_data_(SSLSocketDataProvider(ASYNC, OK)) {
302 ssl_data_.SetNextProto(kProtoHTTP2); 302 ssl_data_.SetNextProto(kProtoHTTP2);
303 ssl_data_.cert = ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); 303 ssl_data_.cert = ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem");
304 } 304 }
305 305
306 protected: 306 protected:
307 void TearDown() override { 307 void TearDown() override {
308 if (sequenced_data_) { 308 if (sequenced_data_) {
309 EXPECT_TRUE(sequenced_data_->AllReadDataConsumed()); 309 EXPECT_TRUE(sequenced_data_->AllReadDataConsumed());
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 1189
1190 // If stream is destroyed, do not call into stream. 1190 // If stream is destroyed, do not call into stream.
1191 if (!GetParam()) 1191 if (!GetParam())
1192 return; 1192 return;
1193 EXPECT_EQ(0, delegate->GetTotalSentBytes()); 1193 EXPECT_EQ(0, delegate->GetTotalSentBytes());
1194 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); 1194 EXPECT_EQ(0, delegate->GetTotalReceivedBytes());
1195 EXPECT_EQ(kProtoUnknown, delegate->GetProtocol()); 1195 EXPECT_EQ(kProtoUnknown, delegate->GetProtocol());
1196 } 1196 }
1197 1197
1198 } // namespace net 1198 } // namespace net
OLDNEW
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698