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

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

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert CLD Created 5 years, 5 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool get_success = request_info->extra_headers.GetHeader( 70 bool get_success = request_info->extra_headers.GetHeader(
71 "Accept-Encoding", &encoding_headers); 71 "Accept-Encoding", &encoding_headers);
72 EXPECT_TRUE(get_success); 72 EXPECT_TRUE(get_success);
73 if (!get_success) return false; 73 if (!get_success) return false;
74 74
75 // This check isn't wrapped with EXPECT* macros because different 75 // This check isn't wrapped with EXPECT* macros because different
76 // results from this function may be expected in different tests. 76 // results from this function may be expected in different tests.
77 for (const std::string& token : 77 for (const std::string& token :
78 base::SplitString(encoding_headers, ", ", base::KEEP_WHITESPACE, 78 base::SplitString(encoding_headers, ", ", base::KEEP_WHITESPACE,
79 base::SPLIT_WANT_NONEMPTY)) { 79 base::SPLIT_WANT_NONEMPTY)) {
80 if (!base::strncasecmp(token.data(), "sdch", token.length())) 80 if (base::EqualsCaseInsensitiveASCII(token, "sdch"))
81 return true; 81 return true;
82 } 82 }
83 return false; 83 return false;
84 } 84 }
85 85
86 void EnableSdch() { 86 void EnableSdch() {
87 context_.SetSdchManager(scoped_ptr<SdchManager>(new SdchManager).Pass()); 87 context_.SetSdchManager(scoped_ptr<SdchManager>(new SdchManager).Pass());
88 } 88 }
89 89
90 MockNetworkLayer network_layer_; 90 MockNetworkLayer network_layer_;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 req_->SetLoadFlags(LOAD_DISABLE_CACHE); 343 req_->SetLoadFlags(LOAD_DISABLE_CACHE);
344 job->Start(); 344 job->Start();
345 base::RunLoop().RunUntilIdle(); 345 base::RunLoop().RunUntilIdle();
346 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); 346 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status());
347 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); 347 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
348 } 348 }
349 349
350 } // namespace 350 } // namespace
351 351
352 } // namespace net 352 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698