Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: components/omnibox/browser/shortcuts_provider_unittest.cc

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Remove debugging info. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/shortcuts_provider.h" 5 #include "components/omnibox/browser/shortcuts_provider.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 match.description = ASCIIToUTF16(shortcuts_to_test_delete[3].description); 738 match.description = ASCIIToUTF16(shortcuts_to_test_delete[3].description);
739 739
740 provider_->DeleteMatch(match); 740 provider_->DeleteMatch(match);
741 EXPECT_EQ(original_shortcuts_count + 1, backend->shortcuts_map().size()); 741 EXPECT_EQ(original_shortcuts_count + 1, backend->shortcuts_map().size());
742 EXPECT_TRUE(backend->shortcuts_map().end() == 742 EXPECT_TRUE(backend->shortcuts_map().end() ==
743 backend->shortcuts_map().find(ASCIIToUTF16("delete"))); 743 backend->shortcuts_map().find(ASCIIToUTF16("delete")));
744 } 744 }
745 745
746 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) { 746 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) {
747 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos, 747 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos,
748 std::string(), GURL(), 748 std::string(), GURL(), base::string16(),
749 metrics::OmniboxEventProto::INVALID_SPEC, false, 749 metrics::OmniboxEventProto::INVALID_SPEC, false,
750 false, true, true, true, TestSchemeClassifier()); 750 false, true, true, true, TestSchemeClassifier());
751 provider_->Start(input, false); 751 provider_->Start(input, false);
752 EXPECT_TRUE(provider_->matches().empty()); 752 EXPECT_TRUE(provider_->matches().empty());
753 } 753 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698