Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } | |
| OLD | NEW |