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

Side by Side Diff: components/test_runner/web_test_proxy.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/web_test_proxy.h" 5 #include "components/test_runner/web_test_proxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 void BlockRequest(blink::WebURLRequest& request) { 194 void BlockRequest(blink::WebURLRequest& request) {
195 request.setURL(GURL("255.255.255.255")); 195 request.setURL(GURL("255.255.255.255"));
196 } 196 }
197 197
198 bool IsLocalHost(const std::string& host) { 198 bool IsLocalHost(const std::string& host) {
199 return host == "127.0.0.1" || host == "localhost"; 199 return host == "127.0.0.1" || host == "localhost";
200 } 200 }
201 201
202 bool IsTestHost(const std::string& host) { 202 bool IsTestHost(const std::string& host) {
203 return base::EndsWith(host, ".test", false); 203 return base::EndsWith(host, ".test", base::CompareCase::INSENSITIVE_ASCII);
204 } 204 }
205 205
206 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) { 206 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) {
207 return host == "255.255.255.255"; 207 return host == "255.255.255.255";
208 } 208 }
209 209
210 // Used to write a platform neutral file:/// URL by only taking the filename 210 // Used to write a platform neutral file:/// URL by only taking the filename
211 // (e.g., converts "file:///tmp/foo.txt" to just "foo.txt"). 211 // (e.g., converts "file:///tmp/foo.txt" to just "foo.txt").
212 std::string URLSuitableForTestResult(const std::string& url) { 212 std::string URLSuitableForTestResult(const std::string& url) {
213 if (url.empty() || std::string::npos == url.find("file://")) 213 if (url.empty() || std::string::npos == url.find("file://"))
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 // to cancel the input method's ongoing composition session. 1422 // to cancel the input method's ongoing composition session.
1423 if (web_widget_) 1423 if (web_widget_)
1424 web_widget_->confirmComposition(); 1424 web_widget_->confirmComposition();
1425 } 1425 }
1426 1426
1427 blink::WebString WebTestProxyBase::acceptLanguages() { 1427 blink::WebString WebTestProxyBase::acceptLanguages() {
1428 return blink::WebString::fromUTF8(accept_languages_); 1428 return blink::WebString::fromUTF8(accept_languages_);
1429 } 1429 }
1430 1430
1431 } // namespace test_runner 1431 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/storage_monitor/volume_mount_watcher_win.cc ('k') | components/variations/net/variations_http_header_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698