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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc

Issue 262093014: Test that OmniboxViewViews has opaque background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and apply review feedback Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | no next file » | 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 "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/omnibox/location_bar.h" 10 #include "chrome/browser/ui/omnibox/location_bar.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 EXPECT_FALSE(omnibox_view->IsSelectAll()); 226 EXPECT_FALSE(omnibox_view->IsSelectAll());
227 227
228 // Pressing tab to focus the omnibox should select all text. 228 // Pressing tab to focus the omnibox should select all text.
229 while (!ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX)) { 229 while (!ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX)) {
230 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_TAB, 230 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_TAB,
231 false, false, false, false)); 231 false, false, false, false));
232 } 232 }
233 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX)); 233 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
234 EXPECT_TRUE(omnibox_view->IsSelectAll()); 234 EXPECT_TRUE(omnibox_view->IsSelectAll());
235 } 235 }
236
237 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, BackgroundIsOpaque) {
238 // The omnibox text should be rendered on an opaque background. Otherwise,
239 // Chrome OS is unable to use subpixel rendering: http://crbug.com/233364
Peter Kasting 2014/05/07 18:48:51 Nit: I'd just change this whole line to "we can't
Daniel Erat 2014/05/07 23:12:36 Done.
240 OmniboxView* view = browser()->window()->GetLocationBar()->GetOmniboxView();
241 EXPECT_FALSE(static_cast<OmniboxViewViews*>(view)->GetRenderText()->
Peter Kasting 2014/05/07 18:48:51 Nit: We can avoid this cast if we use something li
Daniel Erat 2014/05/07 23:12:36 this seems to be the case. i've added in some ASSE
242 background_is_transparent());
243 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698