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

Side by Side Diff: net/base/net_util_unittest.cc

Issue 255333003: Renamed namespaces in src/net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 04/29/2014 19:22:06.75 Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 base::string16 formatted = FormatUrl( 1084 base::string16 formatted = FormatUrl(
1085 GURL(tests[i].input), tests[i].languages, tests[i].format_types, 1085 GURL(tests[i].input), tests[i].languages, tests[i].format_types,
1086 tests[i].escape_rules, NULL, &prefix_len, NULL); 1086 tests[i].escape_rules, NULL, &prefix_len, NULL);
1087 EXPECT_EQ(WideToUTF16(tests[i].output), formatted) << tests[i].description; 1087 EXPECT_EQ(WideToUTF16(tests[i].output), formatted) << tests[i].description;
1088 EXPECT_EQ(tests[i].prefix_len, prefix_len) << tests[i].description; 1088 EXPECT_EQ(tests[i].prefix_len, prefix_len) << tests[i].description;
1089 } 1089 }
1090 } 1090 }
1091 1091
1092 TEST(NetUtilTest, FormatUrlParsed) { 1092 TEST(NetUtilTest, FormatUrlParsed) {
1093 // No unescape case. 1093 // No unescape case.
1094 url_parse::Parsed parsed; 1094 url::Parsed parsed;
1095 base::string16 formatted = FormatUrl( 1095 base::string16 formatted = FormatUrl(
1096 GURL("http://\xE3\x82\xB0:\xE3\x83\xBC@xn--qcka1pmc.jp:8080/" 1096 GURL("http://\xE3\x82\xB0:\xE3\x83\xBC@xn--qcka1pmc.jp:8080/"
1097 "%E3%82%B0/?q=%E3%82%B0#\xE3\x82\xB0"), 1097 "%E3%82%B0/?q=%E3%82%B0#\xE3\x82\xB0"),
1098 "ja", kFormatUrlOmitNothing, UnescapeRule::NONE, &parsed, NULL, 1098 "ja", kFormatUrlOmitNothing, UnescapeRule::NONE, &parsed, NULL,
1099 NULL); 1099 NULL);
1100 EXPECT_EQ(WideToUTF16( 1100 EXPECT_EQ(WideToUTF16(
1101 L"http://%E3%82%B0:%E3%83%BC@\x30B0\x30FC\x30B0\x30EB.jp:8080" 1101 L"http://%E3%82%B0:%E3%83%BC@\x30B0\x30FC\x30B0\x30EB.jp:8080"
1102 L"/%E3%82%B0/?q=%E3%82%B0#\x30B0"), formatted); 1102 L"/%E3%82%B0/?q=%E3%82%B0#\x30B0"), formatted);
1103 EXPECT_EQ(WideToUTF16(L"%E3%82%B0"), 1103 EXPECT_EQ(WideToUTF16(L"%E3%82%B0"),
1104 formatted.substr(parsed.username.begin, parsed.username.len)); 1104 formatted.substr(parsed.username.begin, parsed.username.len));
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) { 1886 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) {
1887 const NonUniqueNameTestData& test_data = GetParam(); 1887 const NonUniqueNameTestData& test_data = GetParam();
1888 1888
1889 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname)); 1889 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname));
1890 } 1890 }
1891 1891
1892 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest, 1892 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest,
1893 testing::ValuesIn(kNonUniqueNameTestData)); 1893 testing::ValuesIn(kNonUniqueNameTestData));
1894 1894
1895 } // namespace net 1895 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util_icu.cc ('k') | net/base/registry_controlled_domains/registry_controlled_domain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698