Chromium Code Reviews| 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 base::PlatformThread::Sleep(1000); | |
|
sky
2011/11/14 18:12:31
Having tests sleep doesn't scale. Isn't there a be
jennyz
2011/11/14 18:41:35
Please see the comments in http://codereview.chrom
| |
| 1540 MouseClick(bound, 1); | 1542 MouseClick(bound, 1); |
| 1541 #if defined(OS_WIN) | 1543 #if defined(OS_WIN) |
| 1542 // In Windows, the text is always in LTR directionality even in RTL UI. | 1544 // 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 | 1545 // TODO(xji): it should change if we fix the directionality in Window's |
| 1544 // NativeTextfieldViews | 1546 // NativeTextfieldViews |
| 1545 EXPECT_EQ(0U, textfield_->GetCursorPosition()); | 1547 EXPECT_EQ(0U, textfield_->GetCursorPosition()); |
| 1546 #else | 1548 #else |
| 1547 EXPECT_EQ(500U, textfield_->GetCursorPosition()); | 1549 EXPECT_EQ(500U, textfield_->GetCursorPosition()); |
| 1548 #endif | 1550 #endif |
| 1549 | 1551 |
| 1550 // Reset locale. | 1552 // Reset locale. |
| 1551 base::i18n::SetICUDefaultLocale(locale); | 1553 base::i18n::SetICUDefaultLocale(locale); |
| 1552 } | 1554 } |
| 1553 | 1555 |
| 1554 } // namespace views | 1556 } // namespace views |
| OLD | NEW |