| 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..f1c6316bb1ad3f7dc143384813b6d1a48faa2c02 100644
|
| --- a/chrome/browser/autocomplete/search_provider_unittest.cc
|
| +++ b/chrome/browser/autocomplete/search_provider_unittest.cc
|
| @@ -2622,3 +2622,23 @@ 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);
|
| + 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);
|
| +}
|
|
|