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

Side by Side Diff: net/url_request/url_request_http_job_unittest.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (!request_info) return false; 66 if (!request_info) return false;
67 67
68 std::string encoding_headers; 68 std::string encoding_headers;
69 bool get_success = request_info->extra_headers.GetHeader( 69 bool get_success = request_info->extra_headers.GetHeader(
70 "Accept-Encoding", &encoding_headers); 70 "Accept-Encoding", &encoding_headers);
71 EXPECT_TRUE(get_success); 71 EXPECT_TRUE(get_success);
72 if (!get_success) return false; 72 if (!get_success) return false;
73 73
74 // This check isn't wrapped with EXPECT* macros because different 74 // This check isn't wrapped with EXPECT* macros because different
75 // results from this function may be expected in different tests. 75 // results from this function may be expected in different tests.
76 std::vector<std::string> tokens; 76 for (const std::string& token :
77 size_t num_tokens = Tokenize(encoding_headers, ", ", &tokens); 77 base::SplitString(encoding_headers, ", ", base::KEEP_WHITESPACE,
78 for (size_t i = 0; i < num_tokens; i++) { 78 base::SPLIT_WANT_NONEMPTY)) {
79 if (!base::strncasecmp(tokens[i].data(), "sdch", tokens[i].length())) 79 if (!strncasecmp(token.data(), "sdch", token.length()))
80 return true; 80 return true;
81 } 81 }
82 return false; 82 return false;
83 } 83 }
84 84
85 void EnableSdch() { 85 void EnableSdch() {
86 context_.SetSdchManager(scoped_ptr<SdchManager>(new SdchManager).Pass()); 86 context_.SetSdchManager(scoped_ptr<SdchManager>(new SdchManager).Pass());
87 } 87 }
88 88
89 MockNetworkLayer network_layer_; 89 MockNetworkLayer network_layer_;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 req_->SetLoadFlags(LOAD_DISABLE_CACHE); 342 req_->SetLoadFlags(LOAD_DISABLE_CACHE);
343 job->Start(); 343 job->Start();
344 base::RunLoop().RunUntilIdle(); 344 base::RunLoop().RunUntilIdle();
345 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); 345 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status());
346 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); 346 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
347 } 347 }
348 348
349 } // namespace 349 } // namespace
350 350
351 } // namespace net 351 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_job_unittest.cc ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698