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

Unified Diff: ui/views/controls/textfield/native_textfield_views_unittest.cc

Issue 10693061: Fix RenderTextWin base dir and adjacent char code; remove test exceptions; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 8 years, 6 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: ui/views/controls/textfield/native_textfield_views_unittest.cc
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index a1a1bac95ccedf2a8786f9aabf0598ce1cce137e..b299e374c41602d9a7d1677437e289f5f6b25c97 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -1407,14 +1407,7 @@ TEST_F(NativeTextfieldViewsTest, TextCursorDisplayInRTLTest) {
SendKeyEvent('a');
EXPECT_EQ(WideToUTF16(L"\x05E1\x5E2"L"a"), textfield_->text());
x = GetCursorBounds().x();
-#if defined(OS_WIN)
- // In Windows, the text is always in LTR directionality even in RTL UI.
- // TODO(xji): it should change if we fix the directionality in Window's
- // NativeTextfieldViews
- EXPECT_LT(prev_x, x);
-#else
EXPECT_EQ(prev_x, x);
-#endif
prev_x = x;
SendKeyEvent('b');
@@ -1504,20 +1497,12 @@ TEST_F(NativeTextfieldViewsTest, HitOutsideTextAreaTest) {
SendKeyEvent(ui::VKEY_HOME);
bound = GetCursorBounds();
-#if defined(OS_WIN)
- MouseClick(bound, -10);
-#else
MouseClick(bound, 10);
-#endif
EXPECT_EQ(bound, GetCursorBounds());
SendKeyEvent(ui::VKEY_END);
bound = GetCursorBounds();
-#if defined(OS_WIN)
- MouseClick(bound, 10);
-#else
MouseClick(bound, -10);
-#endif
EXPECT_EQ(bound, GetCursorBounds());
}
@@ -1545,20 +1530,12 @@ TEST_F(NativeTextfieldViewsTest, HitOutsideTextAreaInRTLTest) {
textfield_->SetText(WideToUTF16(L"ab\x05E1\x5E2"));
SendKeyEvent(ui::VKEY_HOME);
bound = GetCursorBounds();
-#if defined(OS_WIN)
- MouseClick(bound, 10);
-#else
MouseClick(bound, -10);
-#endif
EXPECT_EQ(bound, GetCursorBounds());
SendKeyEvent(ui::VKEY_END);
bound = GetCursorBounds();
-#if defined(OS_WIN)
- MouseClick(bound, -10);
-#else
MouseClick(bound, 10);
-#endif
EXPECT_EQ(bound, GetCursorBounds());
// Reset locale.
@@ -1642,14 +1619,7 @@ TEST_F(NativeTextfieldViewsTest, OverflowInRTLTest) {
NonClientMouseClick();
MouseClick(bound, 1);
-#if defined(OS_WIN)
- // In Windows, the text is always in LTR directionality even in RTL UI.
- // TODO(xji): it should change if we fix the directionality in Window's
- // NativeTextfieldViews
- EXPECT_EQ(0U, textfield_->GetCursorPosition());
-#else
EXPECT_EQ(500U, textfield_->GetCursorPosition());
-#endif
#endif // !defined(OS_WIN)
// Reset locale.

Powered by Google App Engine
This is Rietveld 408576698