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

Side by Side Diff: url/url_util_unittest.cc

Issue 685463002: Fix typo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « net/quic/crypto/quic_crypto_client_config.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "url/url_canon.h" 7 #include "url/url_canon.h"
8 #include "url/url_canon_stdstring.h" 8 #include "url/url_canon_stdstring.h"
9 #include "url/url_parse.h" 9 #include "url/url_parse.h"
10 #include "url/url_test_utils.h" 10 #include "url/url_test_utils.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 const char* rel; 227 const char* rel;
228 bool is_valid; 228 bool is_valid;
229 const char* out; 229 const char* out;
230 } resolve_non_standard_cases[] = { 230 } resolve_non_standard_cases[] = {
231 // Resolving a relative path against a non-hierarchical URL should fail. 231 // Resolving a relative path against a non-hierarchical URL should fail.
232 {"scheme:opaque_data", "/path", false, ""}, 232 {"scheme:opaque_data", "/path", false, ""},
233 // Resolving a relative path against a non-standard authority-based base 233 // Resolving a relative path against a non-standard authority-based base
234 // URL doesn't alter the authority section. 234 // URL doesn't alter the authority section.
235 {"scheme://Authority/", "../path", true, "scheme://Authority/path"}, 235 {"scheme://Authority/", "../path", true, "scheme://Authority/path"},
236 // A non-standard hierarchical base is resolved with path URL 236 // A non-standard hierarchical base is resolved with path URL
237 // canoncialization rules. 237 // canonicalization rules.
238 {"data:/Blah:Blah/", "file.html", true, "data:/Blah:Blah/file.html"}, 238 {"data:/Blah:Blah/", "file.html", true, "data:/Blah:Blah/file.html"},
239 {"data:/Path/../part/part2", "file.html", true, 239 {"data:/Path/../part/part2", "file.html", true,
240 "data:/Path/../part/file.html"}, 240 "data:/Path/../part/file.html"},
241 // Path URL canonicalization rules also apply to non-standard authority- 241 // Path URL canonicalization rules also apply to non-standard authority-
242 // based URLs. 242 // based URLs.
243 {"custom://Authority/", "file.html", true, 243 {"custom://Authority/", "file.html", true,
244 "custom://Authority/file.html"}, 244 "custom://Authority/file.html"},
245 {"custom://Authority/", "other://Auth/", true, "other://Auth/"}, 245 {"custom://Authority/", "other://Auth/", true, "other://Auth/"},
246 {"custom://Authority/", "../../file.html", true, 246 {"custom://Authority/", "../../file.html", true,
247 "custom://Authority/file.html"}, 247 "custom://Authority/file.html"},
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 &resolved_parsed); 289 &resolved_parsed);
290 output.Complete(); 290 output.Complete();
291 291
292 EXPECT_EQ(test_data.is_valid, valid) << i; 292 EXPECT_EQ(test_data.is_valid, valid) << i;
293 if (test_data.is_valid && valid) 293 if (test_data.is_valid && valid)
294 EXPECT_EQ(test_data.out, resolved) << i; 294 EXPECT_EQ(test_data.out, resolved) << i;
295 } 295 }
296 } 296 }
297 297
298 } // namespace url 298 } // namespace url
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698