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

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

Issue 1818923004: [DevTools] Fix to double wrapping IPv6 in square brackets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@BETTER_HAR_SUPPORT
Patch Set: Added rule in test expectations 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_frame_test_client.h" 5 #include "components/test_runner/web_frame_test_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 default: 109 default:
110 return "Unresolved"; 110 return "Unresolved";
111 } 111 }
112 } 112 }
113 113
114 void BlockRequest(blink::WebURLRequest& request) { 114 void BlockRequest(blink::WebURLRequest& request) {
115 request.setURL(GURL("255.255.255.255")); 115 request.setURL(GURL("255.255.255.255"));
116 } 116 }
117 117
118 bool IsLocalHost(const std::string& host) { 118 bool IsLocalHost(const std::string& host) {
119 return host == "127.0.0.1" || host == "localhost"; 119 return host == "127.0.0.1" || host == "localhost" || host == "[::1]";
120 } 120 }
121 121
122 bool IsTestHost(const std::string& host) { 122 bool IsTestHost(const std::string& host) {
123 return base::EndsWith(host, ".test", base::CompareCase::INSENSITIVE_ASCII); 123 return base::EndsWith(host, ".test", base::CompareCase::INSENSITIVE_ASCII);
124 } 124 }
125 125
126 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) { 126 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) {
127 return host == "255.255.255.255"; 127 return host == "255.255.255.255";
128 } 128 }
129 129
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 std::string device_id = sink_id.utf8(); 762 std::string device_id = sink_id.utf8();
763 if (device_id == "valid" || device_id.empty()) 763 if (device_id == "valid" || device_id.empty())
764 callback->onSuccess(); 764 callback->onSuccess();
765 else if (device_id == "unauthorized") 765 else if (device_id == "unauthorized")
766 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 766 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
767 else 767 else
768 callback->onError(blink::WebSetSinkIdError::NotFound); 768 callback->onError(blink::WebSetSinkIdError::NotFound);
769 } 769 }
770 770
771 } // namespace test_runner 771 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698