| OLD | NEW |
| 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/third_party/mozilla/url_parse.h" |
| 7 #include "url/url_canon.h" | 8 #include "url/url_canon.h" |
| 8 #include "url/url_canon_stdstring.h" | 9 #include "url/url_canon_stdstring.h" |
| 9 #include "url/url_parse.h" | |
| 10 #include "url/url_test_utils.h" | 10 #include "url/url_test_utils.h" |
| 11 #include "url/url_util.h" | 11 #include "url/url_util.h" |
| 12 | 12 |
| 13 namespace url { | 13 namespace url { |
| 14 | 14 |
| 15 TEST(URLUtilTest, FindAndCompareScheme) { | 15 TEST(URLUtilTest, FindAndCompareScheme) { |
| 16 Component found_scheme; | 16 Component found_scheme; |
| 17 | 17 |
| 18 // Simple case where the scheme is found and matches. | 18 // Simple case where the scheme is found and matches. |
| 19 const char kStr1[] = "http://www.com/"; | 19 const char kStr1[] = "http://www.com/"; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 bool valid = ResolveRelative(base, strlen(base), | 320 bool valid = ResolveRelative(base, strlen(base), |
| 321 base_parsed, rel, | 321 base_parsed, rel, |
| 322 strlen(rel), NULL, &output, | 322 strlen(rel), NULL, &output, |
| 323 &resolved_parsed); | 323 &resolved_parsed); |
| 324 EXPECT_TRUE(valid); | 324 EXPECT_TRUE(valid); |
| 325 EXPECT_FALSE(resolved_parsed.ref.is_valid()); | 325 EXPECT_FALSE(resolved_parsed.ref.is_valid()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 } // namespace url | 328 } // namespace url |
| OLD | NEW |