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

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

Issue 1812613003: [DevTools] Fix to double wrapping IPv6 in square brackets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html » ('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 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cctype> 10 #include <cctype>
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 default: 193 default:
194 return "Unresolved"; 194 return "Unresolved";
195 } 195 }
196 } 196 }
197 197
198 void BlockRequest(blink::WebURLRequest& request) { 198 void BlockRequest(blink::WebURLRequest& request) {
199 request.setURL(GURL("255.255.255.255")); 199 request.setURL(GURL("255.255.255.255"));
200 } 200 }
201 201
202 bool IsLocalHost(const std::string& host) { 202 bool IsLocalHost(const std::string& host) {
203 return host == "127.0.0.1" || host == "localhost"; 203 return host == "127.0.0.1" || host == "localhost" || host == "[::1]";
204 } 204 }
205 205
206 bool IsTestHost(const std::string& host) { 206 bool IsTestHost(const std::string& host) {
207 return base::EndsWith(host, ".test", base::CompareCase::INSENSITIVE_ASCII); 207 return base::EndsWith(host, ".test", base::CompareCase::INSENSITIVE_ASCII);
208 } 208 }
209 209
210 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) { 210 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) {
211 return host == "255.255.255.255"; 211 return host == "255.255.255.255";
212 } 212 }
213 213
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 1296 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
1297 else 1297 else
1298 callback->onError(blink::WebSetSinkIdError::NotFound); 1298 callback->onError(blink::WebSetSinkIdError::NotFound);
1299 } 1299 }
1300 1300
1301 blink::WebString WebTestProxyBase::acceptLanguages() { 1301 blink::WebString WebTestProxyBase::acceptLanguages() {
1302 return blink::WebString::fromUTF8(accept_languages_); 1302 return blink::WebString::fromUTF8(accept_languages_);
1303 } 1303 }
1304 1304
1305 } // namespace test_runner 1305 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698