| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/base/net_util.h" | 5 #include "net/base/net_util.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 L"?q=%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB", 7}, | 2541 L"?q=%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB", 7}, |
| 2542 | 2542 |
| 2543 {"Unescape normally", | 2543 {"Unescape normally", |
| 2544 "http://%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB.jp/" | 2544 "http://%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB.jp/" |
| 2545 "%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB" | 2545 "%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB" |
| 2546 "?q=%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB", "en", default_format_type, | 2546 "?q=%E3%82%B0%E3%83%BC%E3%82%B0%E3%83%AB", "en", default_format_type, |
| 2547 UnescapeRule::NORMAL, | 2547 UnescapeRule::NORMAL, |
| 2548 L"http://xn--qcka1pmc.jp/\x30B0\x30FC\x30B0\x30EB" | 2548 L"http://xn--qcka1pmc.jp/\x30B0\x30FC\x30B0\x30EB" |
| 2549 L"?q=\x30B0\x30FC\x30B0\x30EB", 7}, | 2549 L"?q=\x30B0\x30FC\x30B0\x30EB", 7}, |
| 2550 | 2550 |
| 2551 {"Unescape normally with BiDi control character", |
| 2552 "http://example.com/%E2%80%AEabc?q=%E2%80%8Fxy", "en", default_format_type, |
| 2553 UnescapeRule::NORMAL, L"http://example.com/%E2%80%AEabc?q=%E2%80%8Fxy", 7}, |
| 2554 |
| 2551 {"Unescape normally including unescape spaces", | 2555 {"Unescape normally including unescape spaces", |
| 2552 "http://www.google.com/search?q=Hello%20World", "en", default_format_type, | 2556 "http://www.google.com/search?q=Hello%20World", "en", default_format_type, |
| 2553 UnescapeRule::SPACES, L"http://www.google.com/search?q=Hello World", 7}, | 2557 UnescapeRule::SPACES, L"http://www.google.com/search?q=Hello World", 7}, |
| 2554 | 2558 |
| 2555 /* | 2559 /* |
| 2556 {"unescape=true with some special characters", | 2560 {"unescape=true with some special characters", |
| 2557 "http://user%3A:%40passwd@example.com/foo%3Fbar?q=b%26z", "", | 2561 "http://user%3A:%40passwd@example.com/foo%3Fbar?q=b%26z", "", |
| 2558 kFormatUrlOmitNothing, UnescapeRule::NORMAL, | 2562 kFormatUrlOmitNothing, UnescapeRule::NORMAL, |
| 2559 L"http://user%3A:%40passwd@example.com/foo%3Fbar?q=b%26z", 25}, | 2563 L"http://user%3A:%40passwd@example.com/foo%3Fbar?q=b%26z", 25}, |
| 2560 */ | 2564 */ |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3519 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) { | 3523 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) { |
| 3520 const NonUniqueNameTestData& test_data = GetParam(); | 3524 const NonUniqueNameTestData& test_data = GetParam(); |
| 3521 | 3525 |
| 3522 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname)); | 3526 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname)); |
| 3523 } | 3527 } |
| 3524 | 3528 |
| 3525 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest, | 3529 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest, |
| 3526 testing::ValuesIn(kNonUniqueNameTestData)); | 3530 testing::ValuesIn(kNonUniqueNameTestData)); |
| 3527 | 3531 |
| 3528 } // namespace net | 3532 } // namespace net |
| OLD | NEW |