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

Unified Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 561983002: Make OmniboxViewTest.BasicTextOperations Work on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove extraneous swap Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 10f517e44e87805e4d44c9b331c2fd5471d1de3f..9cd5b42d7b5947a260499a62d7a661c02f4971c3 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -742,8 +742,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscapeToDefaultMatch) {
}
// Flaky on Windows: http://crbug.com/146619
-// Fails on Linux: http://crbug.com/408637
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN)
#define MAYBE_BasicTextOperations DISABLED_BasicTextOperations
#else
#define MAYBE_BasicTextOperations BasicTextOperations
@@ -762,6 +761,10 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_BasicTextOperations) {
size_t start, end;
omnibox_view->GetSelectionBounds(&start, &end);
+#if defined(OS_WIN) || defined(OS_LINUX)
+ // Views textfields select-all in reverse to show the leading text.
+ std::swap(start, end);
+#endif
EXPECT_EQ(0U, start);
EXPECT_EQ(old_text.size(), end);
@@ -792,6 +795,10 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_BasicTextOperations) {
omnibox_view->SelectAll(true);
EXPECT_TRUE(omnibox_view->IsSelectAll());
omnibox_view->GetSelectionBounds(&start, &end);
+#if defined(OS_WIN) || defined(OS_LINUX)
+ // Views textfields select-all in reverse to show the leading text.
+ std::swap(start, end);
+#endif
EXPECT_EQ(0U, start);
EXPECT_EQ(old_text.size(), end);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698