OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/browser/autocomplete/history_url_provider.h" | 8 #include "chrome/browser/autocomplete/history_url_provider.h" |
9 #include "chrome/browser/bookmark_bar_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_bar_model.h" |
10 #include "chrome/browser/history/history.h" | 10 #include "chrome/browser/history/history.h" |
11 #include "chrome/test/testing_profile.h" | 11 #include "chrome/test/testing_profile.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 struct TestURLInfo { | 14 struct TestURLInfo { |
15 std::wstring url; | 15 std::wstring url; |
16 std::wstring title; | 16 std::wstring title; |
17 int visit_count; | 17 int visit_count; |
18 int typed_count; | 18 int typed_count; |
19 bool starred; | 19 bool starred; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 L"http://bogussite.com/c", | 336 L"http://bogussite.com/c", |
337 }; | 337 }; |
338 RunTest(input_2, std::wstring(), false, fixup_2, arraysize(fixup_2)); | 338 RunTest(input_2, std::wstring(), false, fixup_2, arraysize(fixup_2)); |
339 EXPECT_EQ(input_2.length(), matches_[0].inline_autocomplete_offset); | 339 EXPECT_EQ(input_2.length(), matches_[0].inline_autocomplete_offset); |
340 | 340 |
341 // Adding a TLD to a small number like "56" should result in "www.56.com" | 341 // Adding a TLD to a small number like "56" should result in "www.56.com" |
342 // rather than "0.0.0.56.com". | 342 // rather than "0.0.0.56.com". |
343 std::wstring fixup_3[] = {L"http://www.56.com/"}; | 343 std::wstring fixup_3[] = {L"http://www.56.com/"}; |
344 RunTest(L"56", L"com", true, fixup_3, arraysize(fixup_3)); | 344 RunTest(L"56", L"com", true, fixup_3, arraysize(fixup_3)); |
345 } | 345 } |
OLD | NEW |