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

Side by Side Diff: net/spdy/spdy_http_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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 78
79 class SpdyHttpStreamTest : public testing::Test, 79 class SpdyHttpStreamTest : public testing::Test,
80 public testing::WithParamInterface<TestCase> { 80 public testing::WithParamInterface<TestCase> {
81 public: 81 public:
82 SpdyHttpStreamTest() 82 SpdyHttpStreamTest()
83 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()), 83 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()),
84 session_deps_(GetProtocol()) { 84 session_deps_(GetProtocol()) {
85 SpdySession::SetPriorityDependencyDefaultForTesting( 85 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority();
86 GetDependenciesFromPriority());
87 session_deps_.net_log = &net_log_; 86 session_deps_.net_log = &net_log_;
88 } 87 }
89 88
90 ~SpdyHttpStreamTest() { 89 ~SpdyHttpStreamTest() {}
91 SpdySession::SetPriorityDependencyDefaultForTesting(false);
92 }
93 90
94 protected: 91 protected:
95 NextProto GetProtocol() const { 92 NextProto GetProtocol() const {
96 return GetParam() == kTestCaseSPDY31 ? kProtoSPDY31 : kProtoHTTP2; 93 return GetParam() == kTestCaseSPDY31 ? kProtoSPDY31 : kProtoHTTP2;
97 } 94 }
98 95
99 bool GetDependenciesFromPriority() const { 96 bool GetDependenciesFromPriority() const {
100 return GetParam() == kTestCaseHTTP2PriorityDependencies; 97 return GetParam() == kTestCaseHTTP2PriorityDependencies;
101 } 98 }
102 99
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 EXPECT_EQ(kUploadData, std::string(buf1->data(), kUploadDataSize)); 859 EXPECT_EQ(kUploadData, std::string(buf1->data(), kUploadDataSize));
863 860
864 ASSERT_TRUE(response.headers.get()); 861 ASSERT_TRUE(response.headers.get());
865 ASSERT_EQ(200, response.headers->response_code()); 862 ASSERT_EQ(200, response.headers->response_code());
866 } 863 }
867 864
868 // TODO(willchan): Write a longer test for SpdyStream that exercises all 865 // TODO(willchan): Write a longer test for SpdyStream that exercises all
869 // methods. 866 // methods.
870 867
871 } // namespace net 868 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/http2_priority_dependencies_unittest.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698