OLD | NEW |
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 "components/omnibox/browser/bookmark_provider.h" | 5 #include "components/omnibox/browser/bookmark_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/message_loop/message_loop.h" |
16 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
17 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
19 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
20 #include "components/bookmarks/browser/bookmark_match.h" | 21 #include "components/bookmarks/browser/bookmark_match.h" |
21 #include "components/bookmarks/browser/bookmark_model.h" | 22 #include "components/bookmarks/browser/bookmark_model.h" |
22 #include "components/bookmarks/test/test_bookmark_client.h" | 23 #include "components/bookmarks/test/test_bookmark_client.h" |
23 #include "components/metrics/proto/omnibox_event.pb.h" | 24 #include "components/metrics/proto/omnibox_event.pb.h" |
24 #include "components/omnibox/browser/autocomplete_provider.h" | 25 #include "components/omnibox/browser/autocomplete_provider.h" |
25 #include "components/omnibox/browser/mock_autocomplete_provider_client.h" | 26 #include "components/omnibox/browser/mock_autocomplete_provider_client.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 484 } |
484 | 485 |
485 TEST_F(BookmarkProviderTest, DoesNotProvideMatchesOnFocus) { | 486 TEST_F(BookmarkProviderTest, DoesNotProvideMatchesOnFocus) { |
486 AutocompleteInput input(base::ASCIIToUTF16("foo"), base::string16::npos, | 487 AutocompleteInput input(base::ASCIIToUTF16("foo"), base::string16::npos, |
487 std::string(), GURL(), | 488 std::string(), GURL(), |
488 metrics::OmniboxEventProto::INVALID_SPEC, false, | 489 metrics::OmniboxEventProto::INVALID_SPEC, false, |
489 false, false, true, true, TestSchemeClassifier()); | 490 false, false, true, true, TestSchemeClassifier()); |
490 provider_->Start(input, false); | 491 provider_->Start(input, false); |
491 EXPECT_TRUE(provider_->matches().empty()); | 492 EXPECT_TRUE(provider_->matches().empty()); |
492 } | 493 } |
OLD | NEW |