Lines Matching refs:GetRegistryLengthFromURL
62 size_t GetRegistryLengthFromURL(const std::string& url,
145 EXPECT_EQ(2U, GetRegistryLengthFromURL("http://a.baz.jp/file.html", false));
147 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://a.baz.jp./file.html", false));
149 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://ac.jp", false)); // 2
150 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://a.bar.jp", false)); // 3
151 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://bar.jp", false)); // 3
152 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://baz.bar.jp", false)); // 3 4
153 EXPECT_EQ(12U, GetRegistryLengthFromURL("http://a.b.baz.bar.jp", false));
155 EXPECT_EQ(6U, GetRegistryLengthFromURL("http://baz.pref.bar.jp", false));
157 EXPECT_EQ(11U, GetRegistryLengthFromURL("http://a.b.bar.baz.com", false));
159 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://a.d.c", false)); // 7
160 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://.a.d.c", false)); // 7
161 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://..a.d.c", false)); // 7
162 EXPECT_EQ(1U, GetRegistryLengthFromURL("http://a.b.c", false)); // 7 8
163 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://baz.com", false)); // none
164 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://baz.com.", false)); // none
165 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://baz.com", true)); // none
166 EXPECT_EQ(4U, GetRegistryLengthFromURL("http://baz.com.", true)); // none
168 EXPECT_EQ(std::string::npos, GetRegistryLengthFromURL("", false));
169 EXPECT_EQ(std::string::npos, GetRegistryLengthFromURL("http://", false));
171 GetRegistryLengthFromURL("file:///C:/file.html", false));
172 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://foo.com..", false));
173 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://...", false));
174 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://192.168.0.1", false));
175 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://localhost", false));
176 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://localhost", true));
177 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://localhost.", false));
178 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://localhost.", true));
179 EXPECT_EQ(0U, GetRegistryLengthFromURL("http:////Comment", false));
247 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://google.com", false));
248 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://stanford.edu", false));
249 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://ustreas.gov", false));
250 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://icann.net", false));
251 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://ferretcentral.org", false));
252 EXPECT_EQ(0U, GetRegistryLengthFromURL("http://nowhere.foo", false));
253 EXPECT_EQ(3U, GetRegistryLengthFromURL("http://nowhere.foo", true));