| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 Widget* deactivate_widget_ = nullptr; | 1691 Widget* deactivate_widget_ = nullptr; |
| 1692 | 1692 |
| 1693 DISALLOW_COPY_AND_ASSIGN(WidgetInputMethodInteractiveTest); | 1693 DISALLOW_COPY_AND_ASSIGN(WidgetInputMethodInteractiveTest); |
| 1694 }; | 1694 }; |
| 1695 | 1695 |
| 1696 // Test input method focus changes affected by top window activaction. | 1696 // Test input method focus changes affected by top window activaction. |
| 1697 TEST_F(WidgetInputMethodInteractiveTest, Activation) { | 1697 TEST_F(WidgetInputMethodInteractiveTest, Activation) { |
| 1698 Widget* widget = CreateWidget(); | 1698 Widget* widget = CreateWidget(); |
| 1699 Textfield* textfield = new Textfield; | 1699 Textfield* textfield = new Textfield; |
| 1700 widget->GetRootView()->AddChildView(textfield); | 1700 widget->GetRootView()->AddChildView(textfield); |
| 1701 ShowSync(widget); |
| 1701 textfield->RequestFocus(); | 1702 textfield->RequestFocus(); |
| 1702 | 1703 |
| 1703 ShowSync(widget); | |
| 1704 | |
| 1705 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, | 1704 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, |
| 1706 widget->GetInputMethod()->GetTextInputType()); | 1705 widget->GetInputMethod()->GetTextInputType()); |
| 1707 | 1706 |
| 1708 DeactivateSync(widget); | 1707 DeactivateSync(widget); |
| 1709 | 1708 |
| 1710 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, | 1709 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, |
| 1711 widget->GetInputMethod()->GetTextInputType()); | 1710 widget->GetInputMethod()->GetTextInputType()); |
| 1712 widget->CloseNow(); | 1711 widget->CloseNow(); |
| 1713 } | 1712 } |
| 1714 | 1713 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 | 1858 |
| 1860 ui::KeyEvent key_event2(key_event); | 1859 ui::KeyEvent key_event2(key_event); |
| 1861 widget->OnKeyEvent(&key_event2); | 1860 widget->OnKeyEvent(&key_event2); |
| 1862 EXPECT_FALSE(key_event2.stopped_propagation()); | 1861 EXPECT_FALSE(key_event2.stopped_propagation()); |
| 1863 | 1862 |
| 1864 widget->CloseNow(); | 1863 widget->CloseNow(); |
| 1865 } | 1864 } |
| 1866 | 1865 |
| 1867 } // namespace test | 1866 } // namespace test |
| 1868 } // namespace views | 1867 } // namespace views |
| OLD | NEW |