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

Unified Diff: content/browser/web_contents/touch_editable_impl_aura_browsertest.cc

Issue 304883002: Enable touch text selection tests on all Aura platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert point to root window before screen Created 6 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
« no previous file with comments | « content/browser/web_contents/touch_editable_impl_aura.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
index ce1f6023718cc0989f0a7aa7892e7edf1b2170ce..f34ff1005e726e45475c69e94dc2ee6eac9205fa 100644
--- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
+++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
@@ -172,8 +172,8 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
// Lets move the handles a bit to modify the selection
touch_editable->Reset();
generator.GestureScrollSequence(
- gfx::Point(10, 47),
- gfx::Point(30, 47),
+ gfx::Point(bounds.x() + 10, bounds.y() + 47),
+ gfx::Point(bounds.x() + 30, bounds.y() + 47),
base::TimeDelta::FromMilliseconds(20),
5);
touch_editable->WaitForSelectionChangeCallback();
@@ -318,7 +318,13 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
content::ExecuteScriptAndGetValue(main_frame, "get_selection()");
std::string selection;
value->GetAsString(&selection);
+#if defined(OS_WIN)
+ // In Windows, the default behavior is to select the whitespace after the word
+ // when the word is selected.
+ EXPECT_STREQ("Some ", selection.c_str());
sky 2014/05/29 19:28:28 nit: you can just do: EXPECT_EQ("Some ", selection
+#else
EXPECT_STREQ("Some", selection.c_str());
+#endif // defined (OS_WIN)
}
IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
@@ -361,8 +367,8 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
// Move the cursor handle.
generator.GestureScrollSequence(
- gfx::Point(50, 59),
- gfx::Point(10, 59),
+ gfx::Point(bounds.x() + 50, bounds.y() + 59),
+ gfx::Point(bounds.x() + 10, bounds.y() + 59),
base::TimeDelta::FromMilliseconds(20),
1);
touch_editable->WaitForSelectionChangeCallback();
« no previous file with comments | « content/browser/web_contents/touch_editable_impl_aura.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698