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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FocusedTextInputClient) { 386 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FocusedTextInputClient) {
387 chrome::FocusLocationBar(browser()); 387 chrome::FocusLocationBar(browser());
388 OmniboxView* view = NULL; 388 OmniboxView* view = NULL;
389 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view)); 389 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
390 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view); 390 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
391 ui::InputMethod* input_method = 391 ui::InputMethod* input_method =
392 omnibox_view_views->GetWidget()->GetInputMethod(); 392 omnibox_view_views->GetWidget()->GetInputMethod();
393 EXPECT_EQ(static_cast<ui::TextInputClient*>(omnibox_view_views), 393 EXPECT_EQ(static_cast<ui::TextInputClient*>(omnibox_view_views),
394 input_method->GetTextInputClient()); 394 input_method->GetTextInputClient());
395 } 395 }
396
397 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, TextElideStatus) {
398 OmniboxView* view = nullptr;
399 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
400 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
401
402 ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter());
403 EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
404 gfx::ELIDE_TAIL);
405
406 chrome::FocusLocationBar(browser());
407 EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
408 gfx::NO_ELIDE);
409 }
OLDNEW
« 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