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

Side by Side Diff: net/spdy/spdy_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 | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_test_util_common.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 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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <cstddef> 8 #include <cstddef>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 public ::testing::WithParamInterface<TestCase> { 62 public ::testing::WithParamInterface<TestCase> {
63 protected: 63 protected:
64 // A function that takes a SpdyStream and the number of bytes which 64 // A function that takes a SpdyStream and the number of bytes which
65 // will unstall the next frame completely. 65 // will unstall the next frame completely.
66 typedef base::Callback<void(const base::WeakPtr<SpdyStream>&, int32_t)> 66 typedef base::Callback<void(const base::WeakPtr<SpdyStream>&, int32_t)>
67 UnstallFunction; 67 UnstallFunction;
68 68
69 SpdyStreamTest() 69 SpdyStreamTest()
70 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()), 70 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()),
71 session_deps_(GetProtocol()), 71 session_deps_(GetProtocol()),
72 session_(SpdySessionDependencies::SpdyCreateSession(&session_deps_)),
73 offset_(0) { 72 offset_(0) {
74 SpdySession::SetPriorityDependencyDefaultForTesting( 73 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority();
75 GetDependenciesFromPriority()); 74 session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
76 } 75 }
77 76
78 ~SpdyStreamTest() { 77 ~SpdyStreamTest() {
79 SpdySession::SetPriorityDependencyDefaultForTesting(false);
80 } 78 }
81 79
82 base::WeakPtr<SpdySession> CreateDefaultSpdySession() { 80 base::WeakPtr<SpdySession> CreateDefaultSpdySession() {
83 SpdySessionKey key(HostPortPair("www.example.org", 80), 81 SpdySessionKey key(HostPortPair("www.example.org", 80),
84 ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 82 ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
85 return CreateInsecureSpdySession(session_.get(), key, BoundNetLog()); 83 return CreateInsecureSpdySession(session_.get(), key, BoundNetLog());
86 } 84 }
87 85
88 void TearDown() override { base::MessageLoop::current()->RunUntilIdle(); } 86 void TearDown() override { base::MessageLoop::current()->RunUntilIdle(); }
89 87
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 EXPECT_EQ(response_len, stream->raw_received_bytes()); 1129 EXPECT_EQ(response_len, stream->raw_received_bytes());
1132 1130
1133 // FIN 1131 // FIN
1134 data.Resume(); 1132 data.Resume();
1135 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); 1133 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose());
1136 } 1134 }
1137 1135
1138 } // namespace test 1136 } // namespace test
1139 1137
1140 } // namespace net 1138 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698