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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc

Issue 2855793003: Fix RTL URL rendering in Omnibox (domain off screen on long URL). (Closed)
Patch Set: Update tests to new behaviour. Had to remove BeginningShownAfterBlur entirely. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index fb4136e56e61329d303a543d0e168005f5cc6937..0bfcdf7d10fc54f5dd7a5ca3cf5391abd0b8307d 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -149,10 +149,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, SelectAllOnClick) {
EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
EXPECT_TRUE(omnibox_view->IsSelectAll());
- // Clicking in another view should clear focus and the selection.
+ // Clicking in another view should clear focus.
ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter());
EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
- EXPECT_FALSE(omnibox_view->IsSelectAll());
// Clicking in the omnibox again should take focus and select all text again.
ASSERT_NO_FATAL_FAILURE(Click(ui_controls::LEFT,
@@ -245,7 +244,6 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, SelectAllOnTap) {
// Take the focus away from the omnibox.
ASSERT_NO_FATAL_FAILURE(TapBrowserWindowCenter());
EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
- EXPECT_FALSE(omnibox_view->IsSelectAll());
// Tapping in the omnibox should take focus and select all text.
const gfx::Rect omnibox_bounds = BrowserView::GetBrowserViewForBrowser(
@@ -255,10 +253,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, SelectAllOnTap) {
EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
EXPECT_TRUE(omnibox_view->IsSelectAll());
- // Tapping in another view should clear focus and the selection.
+ // Tapping in another view should clear focus.
ASSERT_NO_FATAL_FAILURE(TapBrowserWindowCenter());
EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
- EXPECT_FALSE(omnibox_view->IsSelectAll());
// Tapping in the omnibox again should take focus and select all text again.
ASSERT_NO_FATAL_FAILURE(Tap(tap_location, tap_location));
@@ -275,11 +272,10 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, SelectAllOnTap) {
// not there was text under the tap, which appears to be flaky.
// Take the focus away and tap in the omnibox again, but drag a bit before
- // releasing. We should focus the omnibox but not select all of its text.
Peter Kasting 2017/05/18 18:27:19 It seems like we should still ensure we don't focu
Matt Giuca 2017/05/19 05:55:32 True, this should still be false. (I kind of guess
+ // releasing. We should focus the omnibox.
ASSERT_NO_FATAL_FAILURE(TapBrowserWindowCenter());
ASSERT_NO_FATAL_FAILURE(Tap(tap_location, tap2_location));
EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
- EXPECT_FALSE(omnibox_view->IsSelectAll());
}
IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, SelectAllOnTabToFocus) {

Powered by Google App Engine
This is Rietveld 408576698