OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/autocomplete/autocomplete.h" | 9 #include "chrome/browser/autocomplete/autocomplete.h" |
10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
11 #include "chrome/browser/autocomplete/history_contents_provider.h" | 11 #include "chrome/browser/autocomplete/history_contents_provider.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
14 #include "chrome/browser/history/history.h" | 14 #include "chrome/browser/history/history.h" |
15 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "content/test/test_browser_thread.h" | 17 #include "content/test/test_browser_thread.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using base::Time; | 20 using base::Time; |
21 using base::TimeDelta; | 21 using base::TimeDelta; |
22 | 22 |
| 23 using content::BrowserThread; |
| 24 |
23 namespace { | 25 namespace { |
24 | 26 |
25 struct TestEntry { | 27 struct TestEntry { |
26 const char* url; | 28 const char* url; |
27 const char* title; | 29 const char* title; |
28 const char* body; | 30 const char* body; |
29 } test_entries[] = { | 31 } test_entries[] = { |
30 {"http://www.google.com/1", "PAGEONE 1", "FOO some body text"}, | 32 {"http://www.google.com/1", "PAGEONE 1", "FOO some body text"}, |
31 {"http://www.google.com/2", "PAGEONE 2", "FOO some more blah blah"}, | 33 {"http://www.google.com/2", "PAGEONE 2", "FOO some more blah blah"}, |
32 {"http://www.google.com/3", "PAGETHREE 3", "BAR some hello world for you"}, | 34 {"http://www.google.com/3", "PAGETHREE 3", "BAR some hello world for you"}, |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 true, AutocompleteInput::ALL_MATCHES); | 276 true, AutocompleteInput::ALL_MATCHES); |
275 RunQuery(you_input, false); | 277 RunQuery(you_input, false); |
276 EXPECT_EQ(0U, matches().size()); | 278 EXPECT_EQ(0U, matches().size()); |
277 | 279 |
278 // Run a query that matches the bookmark | 280 // Run a query that matches the bookmark |
279 RunQuery(input, false); | 281 RunQuery(input, false); |
280 EXPECT_EQ(1U, matches().size()); | 282 EXPECT_EQ(1U, matches().size()); |
281 } | 283 } |
282 | 284 |
283 } // namespace | 285 } // namespace |
OLD | NEW |