Home | History | Annotate | Download | only in autocomplete

Lines Matching refs:AutocompleteInput

43   virtual void Start(const AutocompleteInput& input,
61 void TestProvider::Start(const AutocompleteInput& input,
71 if (input.matches_requested() == AutocompleteInput::ALL_MATCHES) {
207 AutocompleteInput::ALL_MATCHES);
222 AutocompleteInput::SYNCHRONOUS_MATCHES);
275 const AutocompleteInput::Type type;
277 { ASCIIToUTF16(""), AutocompleteInput::INVALID },
278 { ASCIIToUTF16("?"), AutocompleteInput::FORCED_QUERY },
279 { ASCIIToUTF16("?foo"), AutocompleteInput::FORCED_QUERY },
280 { ASCIIToUTF16("?foo bar"), AutocompleteInput::FORCED_QUERY },
281 { ASCIIToUTF16("?http://foo.com/bar"), AutocompleteInput::FORCED_QUERY },
282 { ASCIIToUTF16("foo"), AutocompleteInput::UNKNOWN },
283 { ASCIIToUTF16("foo.c"), AutocompleteInput::UNKNOWN },
284 { ASCIIToUTF16("foo.com"), AutocompleteInput::URL },
285 { ASCIIToUTF16("-.com"), AutocompleteInput::UNKNOWN },
286 { ASCIIToUTF16("foo/bar"), AutocompleteInput::URL },
287 { ASCIIToUTF16("foo;bar"), AutocompleteInput::QUERY },
288 { ASCIIToUTF16("foo/bar baz"), AutocompleteInput::UNKNOWN },
289 { ASCIIToUTF16("foo bar.com"), AutocompleteInput::QUERY },
290 { ASCIIToUTF16("foo bar"), AutocompleteInput::QUERY },
291 { ASCIIToUTF16("foo+bar"), AutocompleteInput::QUERY },
292 { ASCIIToUTF16("foo+bar.com"), AutocompleteInput::UNKNOWN },
293 { ASCIIToUTF16("\"foo:bar\""), AutocompleteInput::QUERY },
294 { ASCIIToUTF16("link:foo.com"), AutocompleteInput::UNKNOWN },
295 { ASCIIToUTF16("foo:81"), AutocompleteInput::URL },
296 { ASCIIToUTF16("www.foo.com:81"), AutocompleteInput::URL },
297 { ASCIIToUTF16("localhost:8080"), AutocompleteInput::URL },
298 { ASCIIToUTF16("foo.com:123456"), AutocompleteInput::QUERY },
299 { ASCIIToUTF16("foo.com:abc"), AutocompleteInput::QUERY },
300 { ASCIIToUTF16("1.2.3.4:abc"), AutocompleteInput::QUERY },
301 { ASCIIToUTF16("user@foo.com"), AutocompleteInput::UNKNOWN },
302 { ASCIIToUTF16("user:pass@"), AutocompleteInput::UNKNOWN },
303 { ASCIIToUTF16("user:pass@!foo.com"), AutocompleteInput::UNKNOWN },
304 { ASCIIToUTF16("user:pass@foo"), AutocompleteInput::URL },
305 { ASCIIToUTF16("user:pass@foo.c"), AutocompleteInput::URL },
306 { ASCIIToUTF16("user:pass@foo.com"), AutocompleteInput::URL },
307 { ASCIIToUTF16("user:pass@foo.com:81"), AutocompleteInput::URL },
308 { ASCIIToUTF16("user:pass@foo:81"), AutocompleteInput::URL },
309 { ASCIIToUTF16("1.2"), AutocompleteInput::UNKNOWN },
310 { ASCIIToUTF16("1.2/45"), AutocompleteInput::UNKNOWN },
311 { ASCIIToUTF16("1.2:45"), AutocompleteInput::UNKNOWN },
312 { ASCIIToUTF16("user@1.2:45"), AutocompleteInput::UNKNOWN },
313 { ASCIIToUTF16("user:pass@1.2:45"), AutocompleteInput::URL },
314 { ASCIIToUTF16("ps/2 games"), AutocompleteInput::UNKNOWN },
316 AutocompleteInput::URL },
320 // { ASCIIToUTF16("mailto:abuse@foo.com"), AutocompleteInput::URL },
321 { ASCIIToUTF16("view-source:http://www.foo.com/"), AutocompleteInput::URL },
323 AutocompleteInput::URL },
325 { ASCIIToUTF16("C:\\Program Files"), AutocompleteInput::URL },
326 { ASCIIToUTF16("\\\\Server\\Folder\\File"), AutocompleteInput::URL },
328 { ASCIIToUTF16("http:foo"), AutocompleteInput::URL },
329 { ASCIIToUTF16("http://foo"), AutocompleteInput::URL },
330 { ASCIIToUTF16("http://foo.c"), AutocompleteInput::URL },
331 { ASCIIToUTF16("http://foo.com"), AutocompleteInput::URL },
332 { ASCIIToUTF16("http://foo_bar.com"), AutocompleteInput::URL },
333 { ASCIIToUTF16("http://foo/bar baz"), AutocompleteInput::URL },
334 { ASCIIToUTF16("http://-.com"), AutocompleteInput::UNKNOWN },
335 { ASCIIToUTF16("http://_foo_.com"), AutocompleteInput::UNKNOWN },
336 { ASCIIToUTF16("http://foo.com:abc"), AutocompleteInput::QUERY },
337 { ASCIIToUTF16("http://foo.com:123456"), AutocompleteInput::QUERY },
338 { ASCIIToUTF16("http://1.2.3.4:abc"), AutocompleteInput::QUERY },
339 { ASCIIToUTF16("http:user@foo.com"), AutocompleteInput::URL },
340 { ASCIIToUTF16("http://user@foo.com"), AutocompleteInput::URL },
341 { ASCIIToUTF16("http:user:pass@foo.com"), AutocompleteInput::URL },
342 { ASCIIToUTF16("http://user:pass@foo.com"), AutocompleteInput::URL },
343 { ASCIIToUTF16("http://1.2"), AutocompleteInput::URL },
344 { ASCIIToUTF16("http://1.2/45"), AutocompleteInput::URL },
345 { ASCIIToUTF16("http:ps/2 games"), AutocompleteInput::URL },
346 { ASCIIToUTF16("http://ps/2 games"), AutocompleteInput::URL },
347 { ASCIIToUTF16("https://foo.com"), AutocompleteInput::URL },
348 { ASCIIToUTF16("127.0.0.1"), AutocompleteInput::URL },
349 { ASCIIToUTF16("127.0.1"), AutocompleteInput::UNKNOWN },
350 { ASCIIToUTF16("127.0.1/"), AutocompleteInput::UNKNOWN },
351 { ASCIIToUTF16("browser.tabs.closeButtons"), AutocompleteInput::UNKNOWN },
352 { WideToUTF16(L"\u6d4b\u8bd5"), AutocompleteInput::UNKNOWN },
353 { ASCIIToUTF16("[2001:]"), AutocompleteInput::QUERY }, // Not a valid IP
354 { ASCIIToUTF16("[2001:dB8::1]"), AutocompleteInput::URL },
356 AutocompleteInput::QUERY }, // Invalid IPv4 literal.
358 AutocompleteInput::QUERY }, // Invalid IPv6 literal.
363 AutocompleteInput input(input_cases[i].input, string16(), true, false,
364 true, AutocompleteInput::ALL_MATCHES);
372 const AutocompleteInput::Type type;
374 { ASCIIToUTF16("401k"), AutocompleteInput::REQUESTED_URL },
375 { ASCIIToUTF16("999999999999999"), AutocompleteInput::REQUESTED_URL },
379 AutocompleteInput input(input_cases[i].input, ASCIIToUTF16("com"), true,
380 false, true, AutocompleteInput::ALL_MATCHES);
389 AutocompleteInput input(WideToUTF16(L"\uff65@s"), string16(), true, false,
390 AutocompleteInput::ALL_MATCHES);
419 TEST(AutocompleteInput, ParseForEmphasizeComponent) {
455 AutocompleteInput::ParseForEmphasizeComponents(input_cases[i].input,
459 AutocompleteInput input(input_cases[i].input, string16(), true, false,
460 true, AutocompleteInput::ALL_MATCHES);