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 #if defined(OS_CHROMEOS) | |
Peter Kasting
2014/05/06 21:28:33
Why CrOS-only? Doesn't this affect other platform
Daniel Erat
2014/05/07 18:43:02
chrome os is the only platform where i've heard th
| |
238 IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, BackgroundIsOpaque) { | |
239 // The omnibox text should be rendered on an opaque background. Otherwise, | |
240 // Chrome OS is unable to use subpixel rendering: http://crbug.com/233364 | |
241 OmniboxView* view = browser()->window()->GetLocationBar()->GetOmniboxView(); | |
242 EXPECT_FALSE(static_cast<OmniboxViewViews*>(view)-> | |
243 GetRenderTextForTesting()->background_is_transparent()); | |
244 } | |
245 #endif | |
OLD | NEW |