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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc

Issue 2817403002: [Omnibox] Elide omnibox text (Closed)
Patch Set: Add comment Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index 91b12dd6237d52870b183983672973778281b1cf..048cff790b7936c30e4591e3da3add896f809573 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -393,3 +393,17 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FocusedTextInputClient) {
EXPECT_EQ(static_cast<ui::TextInputClient*>(omnibox_view_views),
input_method->GetTextInputClient());
}
+
+IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, TextElideStatus) {
+ OmniboxView* view = nullptr;
+ ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
+ OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
+
+ ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter());
+ EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
+ gfx::ELIDE_TAIL);
+
+ chrome::FocusLocationBar(browser());
+ EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
+ gfx::NO_ELIDE);
+}
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698