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

Side by Side Diff: net/spdy/spdy_http_utils_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_http_utils.cc ('k') | net/spdy/spdy_network_transaction_unittest.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_http_utils.h" 5 #include "net/spdy/spdy_http_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "net/http/http_request_info.h" 8 #include "net/http/http_request_info.h"
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 #include "net/spdy/spdy_test_utils.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 namespace { 15 namespace {
15 16
16 bool kDirect = true; 17 bool kDirect = true;
17 18
18 } // namespace 19 } // namespace
19 20
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 HttpRequestInfo request; 180 HttpRequestInfo request;
180 request.method = "CONNECT"; 181 request.method = "CONNECT";
181 request.url = url; 182 request.url = url;
182 request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, "Chrome/1.1"); 183 request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, "Chrome/1.1");
183 SpdyHeaderBlock headers; 184 SpdyHeaderBlock headers;
184 CreateSpdyHeadersFromHttpRequest(request, request.extra_headers, HTTP2, 185 CreateSpdyHeadersFromHttpRequest(request, request.extra_headers, HTTP2,
185 kDirect, &headers); 186 kDirect, &headers);
186 EXPECT_EQ("CONNECT", headers[":method"]); 187 EXPECT_EQ("CONNECT", headers[":method"]);
187 EXPECT_TRUE(headers.end() == headers.find(":scheme")); 188 EXPECT_TRUE(headers.end() == headers.find(":scheme"));
188 EXPECT_EQ("www.google.com:443", headers[":authority"]); 189 EXPECT_EQ("www.google.com:443", headers[":authority"]);
189 EXPECT_EQ(0u, headers.count(":path")); 190 EXPECT_EQ(headers.end(), headers.find(":path"));
190 EXPECT_EQ(0u, headers.count(":scheme")); 191 EXPECT_EQ(headers.end(), headers.find(":scheme"));
191 EXPECT_TRUE(headers.end() == headers.find(":version")); 192 EXPECT_TRUE(headers.end() == headers.find(":version"));
192 EXPECT_EQ("Chrome/1.1", headers["user-agent"]); 193 EXPECT_EQ("Chrome/1.1", headers["user-agent"]);
193 } 194 }
194 195
195 } // namespace net 196 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_utils.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698