OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 SendKeyEvent(ui::VKEY_A, false, true); | 1530 SendKeyEvent(ui::VKEY_A, false, true); |
1531 SendKeyEvent('\n'); | 1531 SendKeyEvent('\n'); |
1532 | 1532 |
1533 for (int i = 0; i < 500; ++i) | 1533 for (int i = 0; i < 500; ++i) |
1534 SendKeyEvent(kHebrewLetterSamekh); | 1534 SendKeyEvent(kHebrewLetterSamekh); |
1535 SendKeyEvent('a'); | 1535 SendKeyEvent('a'); |
1536 bound = GetCursorBounds(); | 1536 bound = GetCursorBounds(); |
1537 display = GetDisplayRect(); | 1537 display = GetDisplayRect(); |
1538 OverflowCursorBoundTestVerifier(display, bound); | 1538 OverflowCursorBoundTestVerifier(display, bound); |
1539 | 1539 |
| 1540 // Sleep 1 second to simulate another single click. |
| 1541 // TODO(jennyz): NonClientMouseClick() does not work for win_aura build; |
| 1542 // see crbug.con/104150. Should replace the Sleep() call with |
| 1543 // NonClientMouseClick() once the bug is fixed. |
| 1544 base::PlatformThread::Sleep(1000); |
1540 MouseClick(bound, 1); | 1545 MouseClick(bound, 1); |
1541 #if defined(OS_WIN) | 1546 #if defined(OS_WIN) |
1542 // In Windows, the text is always in LTR directionality even in RTL UI. | 1547 // In Windows, the text is always in LTR directionality even in RTL UI. |
1543 // TODO(xji): it should change if we fix the directionality in Window's | 1548 // TODO(xji): it should change if we fix the directionality in Window's |
1544 // NativeTextfieldViews | 1549 // NativeTextfieldViews |
1545 EXPECT_EQ(0U, textfield_->GetCursorPosition()); | 1550 EXPECT_EQ(0U, textfield_->GetCursorPosition()); |
1546 #else | 1551 #else |
1547 EXPECT_EQ(500U, textfield_->GetCursorPosition()); | 1552 EXPECT_EQ(500U, textfield_->GetCursorPosition()); |
1548 #endif | 1553 #endif |
1549 | 1554 |
1550 // Reset locale. | 1555 // Reset locale. |
1551 base::i18n::SetICUDefaultLocale(locale); | 1556 base::i18n::SetICUDefaultLocale(locale); |
1552 } | 1557 } |
1553 | 1558 |
1554 } // namespace views | 1559 } // namespace views |
OLD | NEW |