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

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

Issue 941523002: Rename: background_is_transparent -> subpixel_rendering_enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fix Created 5 years, 10 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 | « no previous file | ui/gfx/canvas_skia.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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/search_engines/template_url_service_factory.h" 8 #include "chrome/browser/search_engines/template_url_service_factory.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 EXPECT_FALSE(omnibox_view->model()->popup_model()->IsOpen()); 339 EXPECT_FALSE(omnibox_view->model()->popup_model()->IsOpen());
340 } 340 }
341 341
342 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, BackgroundIsOpaque) { 342 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, BackgroundIsOpaque) {
343 // The omnibox text should be rendered on an opaque background. Otherwise, we 343 // The omnibox text should be rendered on an opaque background. Otherwise, we
344 // can't use subpixel rendering. 344 // can't use subpixel rendering.
345 OmniboxViewViews* view = BrowserView::GetBrowserViewForBrowser(browser())-> 345 OmniboxViewViews* view = BrowserView::GetBrowserViewForBrowser(browser())->
346 toolbar()->location_bar()->omnibox_view(); 346 toolbar()->location_bar()->omnibox_view();
347 ASSERT_TRUE(view); 347 ASSERT_TRUE(view);
348 EXPECT_FALSE(view->GetRenderText()->background_is_transparent()); 348 EXPECT_FALSE(view->GetRenderText()->subpixel_rendering_suppressed());
349 } 349 }
350 350
351 // Tests if executing a command hides touch editing handles. 351 // Tests if executing a command hides touch editing handles.
352 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, 352 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest,
353 DeactivateTouchEditingOnExecuteCommand) { 353 DeactivateTouchEditingOnExecuteCommand) {
354 base::CommandLine::ForCurrentProcess()->AppendSwitch( 354 base::CommandLine::ForCurrentProcess()->AppendSwitch(
355 switches::kEnableTouchEditing); 355 switches::kEnableTouchEditing);
356 356
357 OmniboxView* view = NULL; 357 OmniboxView* view = NULL;
358 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view)); 358 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
(...skipping 25 matching lines...) Expand all
384 // TextInputFocusManager completes. 384 // TextInputFocusManager completes.
385 chrome::FocusLocationBar(browser()); 385 chrome::FocusLocationBar(browser());
386 OmniboxView* view = NULL; 386 OmniboxView* view = NULL;
387 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view)); 387 ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
388 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view); 388 OmniboxViewViews* omnibox_view_views = static_cast<OmniboxViewViews*>(view);
389 ui::TextInputFocusManager* text_input_focus_manager = 389 ui::TextInputFocusManager* text_input_focus_manager =
390 ui::TextInputFocusManager::GetInstance(); 390 ui::TextInputFocusManager::GetInstance();
391 EXPECT_EQ(omnibox_view_views->GetTextInputClient(), 391 EXPECT_EQ(omnibox_view_views->GetTextInputClient(),
392 text_input_focus_manager->GetFocusedTextInputClient()); 392 text_input_focus_manager->GetFocusedTextInputClient());
393 } 393 }
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/canvas_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698