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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm

Issue 2510373003: Cleanup: Remove "gray text" logic from Omnibox (Closed)
Patch Set: review2 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
index 3e2faa2568179b4e458d64afad438d4e565990c3..87434c93816f581e5447da579d1148d93839b165 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
@@ -147,35 +147,6 @@ TEST_F(OmniboxViewMacTest, TabToAutocomplete) {
EXPECT_EQ(-1, model->up_or_down_count());
}
-TEST_F(OmniboxViewMacTest, SetGrayTextAutocompletion) {
- const NSRect frame = NSMakeRect(0, 0, 50, 30);
- base::scoped_nsobject<AutocompleteTextField> field(
- [[AutocompleteTextField alloc] initWithFrame:frame]);
-
- TestingToolbarModelDelegate delegate;
- ToolbarModelImpl toolbar_model(&delegate, content::kMaxURLDisplayChars);
- TestingOmniboxEditController controller(&toolbar_model);
- OmniboxViewMac view(&controller, profile(), NULL, field.get());
-
- // This is deleted by the omnibox view.
- MockOmniboxEditModel* model =
- new MockOmniboxEditModel(&view, &controller, profile());
- SetModel(&view, model);
-
- MockOmniboxPopupView popup_view;
- OmniboxPopupModel popup_model(&popup_view, model);
-
- view.SetUserText(base::ASCIIToUTF16("Alfred"));
- EXPECT_EQ("Alfred", base::UTF16ToUTF8(view.GetText()));
- view.SetGrayTextAutocompletion(base::ASCIIToUTF16(" Hitchcock"));
- EXPECT_EQ("Alfred", base::UTF16ToUTF8(view.GetText()));
- EXPECT_EQ(" Hitchcock", base::UTF16ToUTF8(view.GetGrayTextAutocompletion()));
-
- view.SetUserText(base::string16());
- EXPECT_EQ(base::string16(), view.GetText());
- EXPECT_EQ(base::string16(), view.GetGrayTextAutocompletion());
-}
-
TEST_F(OmniboxViewMacTest, UpDownArrow) {
OmniboxViewMac view(NULL, profile(), NULL, NULL);
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698