Chromium Code Reviews| Index: chrome/browser/autocomplete/search_provider_unittest.cc |
| diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc |
| index 764f3c34329b783d9fe04e5ec18a82621bf2a71d..e96bef199515cd9193f1a7ca4ff4285d1e694a14 100644 |
| --- a/chrome/browser/autocomplete/search_provider_unittest.cc |
| +++ b/chrome/browser/autocomplete/search_provider_unittest.cc |
| @@ -2622,3 +2622,24 @@ TEST_F(SearchProviderTest, PrefetchMetadataParsing) { |
| } |
| } |
| } |
| + |
| +TEST_F(SearchProviderTest, ReflectsBookmarkBarState) { |
| + profile_.GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, false); |
| + string16 term = term1_.substr(0, term1_.length() - 1); |
| + QueryForInput(term, true, false); |
| + |
|
Peter Kasting
2013/10/01 21:54:55
Nit: Remove this (since you don't have a similar b
Jered
2013/10/01 23:07:07
Done.
|
| + ASSERT_FALSE(provider_->matches().empty()); |
| + EXPECT_EQ(AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED, |
| + provider_->matches()[0].type); |
| + ASSERT_TRUE(provider_->matches()[0].search_terms_args != NULL); |
| + EXPECT_FALSE(provider_->matches()[0].search_terms_args->bookmark_bar_pinned); |
| + |
| + profile_.GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); |
| + term = term1_.substr(0, term1_.length() - 1); |
| + QueryForInput(term, true, false); |
| + ASSERT_FALSE(provider_->matches().empty()); |
| + EXPECT_EQ(AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED, |
| + provider_->matches()[0].type); |
| + ASSERT_TRUE(provider_->matches()[0].search_terms_args != NULL); |
| + EXPECT_TRUE(provider_->matches()[0].search_terms_args->bookmark_bar_pinned); |
| +} |