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

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

Issue 16776005: net: use IsSecureScheme rather than matching "https". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ERR_HEADERS_TRUNCATED => ERR_RESPONSE_HEADERS_TRUNCATED Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | no next file » | 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/http/http_stream_parser.h" 5 #include "net/http/http_stream_parser.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 rv = parser.ReadResponseHeaders(callback.callback()); 395 rv = parser.ReadResponseHeaders(callback.callback());
396 if (i == arraysize(reads) - 1) { 396 if (i == arraysize(reads) - 1) {
397 EXPECT_EQ(OK, rv); 397 EXPECT_EQ(OK, rv);
398 EXPECT_TRUE(response_info.headers.get()); 398 EXPECT_TRUE(response_info.headers.get());
399 } else { 399 } else {
400 if (protocol == HTTP) { 400 if (protocol == HTTP) {
401 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); 401 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv);
402 EXPECT_TRUE(response_info.headers.get()); 402 EXPECT_TRUE(response_info.headers.get());
403 } else { 403 } else {
404 EXPECT_EQ(ERR_HEADERS_TRUNCATED, rv); 404 EXPECT_EQ(ERR_RESPONSE_HEADERS_TRUNCATED, rv);
405 EXPECT_FALSE(response_info.headers.get()); 405 EXPECT_FALSE(response_info.headers.get());
406 } 406 }
407 } 407 }
408 } 408 }
409 } 409 }
410 } 410 }
411 411
412 } // namespace net 412 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698