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 #if defined(OS_WIN) | |
sky
2011/11/15 00:30:26
Sorry I wasn't clear. You should disable this test
jennyz
2011/11/15 01:00:27
Done.
| |
1541 // Sleep 1 second to simulate another single click. | |
1542 // TODO(jennyz): NonClientMouseClick() does not work for os_win build; | |
1543 // see crbug.com/104150. Should replace the Sleep() call with | |
1544 // NonClientMouseClick() once the bug is fixed. | |
1545 base::PlatformThread::Sleep(1000); | |
1546 #else | |
1547 NonClientMouseClick(); | |
1548 #endif | |
1549 | |
1540 MouseClick(bound, 1); | 1550 MouseClick(bound, 1); |
1541 #if defined(OS_WIN) | 1551 #if defined(OS_WIN) |
1542 // In Windows, the text is always in LTR directionality even in RTL UI. | 1552 // 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 | 1553 // TODO(xji): it should change if we fix the directionality in Window's |
1544 // NativeTextfieldViews | 1554 // NativeTextfieldViews |
1545 EXPECT_EQ(0U, textfield_->GetCursorPosition()); | 1555 EXPECT_EQ(0U, textfield_->GetCursorPosition()); |
1546 #else | 1556 #else |
1547 EXPECT_EQ(500U, textfield_->GetCursorPosition()); | 1557 EXPECT_EQ(500U, textfield_->GetCursorPosition()); |
1548 #endif | 1558 #endif |
1549 | 1559 |
1550 // Reset locale. | 1560 // Reset locale. |
1551 base::i18n::SetICUDefaultLocale(locale); | 1561 base::i18n::SetICUDefaultLocale(locale); |
1552 } | 1562 } |
1553 | 1563 |
1554 } // namespace views | 1564 } // namespace views |
OLD | NEW |