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

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

Issue 1357953002: Replace the existing SpdyHeaderBlock typedef with a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add NET_EXPORT to fix compile error on win_chromium_compile_dbg_ng. Created 5 years, 2 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.cc ('k') | net/spdy/spdy_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 (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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after
4569 headers["alpha"] = "beta"; 4569 headers["alpha"] = "beta";
4570 4570
4571 SpdyHeaderBlock request_headers; 4571 SpdyHeaderBlock request_headers;
4572 SpdyHeaderBlock response_headers; 4572 SpdyHeaderBlock response_headers;
4573 4573
4574 SplitPushedHeadersToRequestAndResponse( 4574 SplitPushedHeadersToRequestAndResponse(
4575 headers, spdy_util_.spdy_version(), &request_headers, &response_headers); 4575 headers, spdy_util_.spdy_version(), &request_headers, &response_headers);
4576 4576
4577 SpdyHeaderBlock::const_iterator it = response_headers.find("alpha"); 4577 SpdyHeaderBlock::const_iterator it = response_headers.find("alpha");
4578 std::string alpha_val = 4578 std::string alpha_val =
4579 (it == response_headers.end()) ? std::string() : it->second; 4579 (it == response_headers.end()) ? std::string() : it->second.as_string();
4580 EXPECT_EQ("beta", alpha_val); 4580 EXPECT_EQ("beta", alpha_val);
4581 4581
4582 GURL request_url = 4582 GURL request_url =
4583 GetUrlFromHeaderBlock(request_headers, spdy_util_.spdy_version(), true); 4583 GetUrlFromHeaderBlock(request_headers, spdy_util_.spdy_version(), true);
4584 EXPECT_EQ(kStreamUrl, request_url); 4584 EXPECT_EQ(kStreamUrl, request_url);
4585 } 4585 }
4586 4586
4587 // Regression. Sorta. Push streams and client streams were sharing a single 4587 // Regression. Sorta. Push streams and client streams were sharing a single
4588 // limit for a long time. 4588 // limit for a long time.
4589 TEST_P(SpdySessionTest, PushedStreamShouldNotCountToClientConcurrencyLimit) { 4589 TEST_P(SpdySessionTest, PushedStreamShouldNotCountToClientConcurrencyLimit) {
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
5113 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), 5113 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(),
5114 "spdy_pooling.pem"); 5114 "spdy_pooling.pem");
5115 ssl_info.is_issued_by_known_root = true; 5115 ssl_info.is_issued_by_known_root = true;
5116 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); 5116 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin));
5117 5117
5118 EXPECT_TRUE(SpdySession::CanPool( 5118 EXPECT_TRUE(SpdySession::CanPool(
5119 &tss, ssl_info, "www.example.org", "mail.example.org")); 5119 &tss, ssl_info, "www.example.org", "mail.example.org"));
5120 } 5120 }
5121 5121
5122 } // namespace net 5122 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698