| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 widget->ShowInactive(); | 263 widget->ShowInactive(); |
| 264 textfield->RequestFocus(); | 264 textfield->RequestFocus(); |
| 265 | 265 |
| 266 EXPECT_FALSE(widget->IsActive()); | 266 EXPECT_FALSE(widget->IsActive()); |
| 267 // TODO(shuchen): uncomment the below check once the | 267 // TODO(shuchen): uncomment the below check once the |
| 268 // "default-focused-input-method" logic is removed in aura::WindowTreeHost. | 268 // "default-focused-input-method" logic is removed in aura::WindowTreeHost. |
| 269 //EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, | 269 //EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, |
| 270 // widget->GetInputMethod()->GetTextInputType()); | 270 // widget->GetInputMethod()->GetTextInputType()); |
| 271 | 271 |
| 272 widget->Activate(); | 272 widget->Activate(); |
| 273 ActivationWaiter waiter( |
| 274 widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()); |
| 275 waiter.Wait(); |
| 273 | 276 |
| 274 EXPECT_TRUE(widget->IsActive()); | 277 EXPECT_TRUE(widget->IsActive()); |
| 275 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, | 278 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, |
| 276 widget->GetInputMethod()->GetTextInputType()); | 279 widget->GetInputMethod()->GetTextInputType()); |
| 277 | 280 |
| 278 widget->Deactivate(); | 281 widget->Deactivate(); |
| 279 | 282 |
| 280 EXPECT_FALSE(widget->IsActive()); | 283 EXPECT_FALSE(widget->IsActive()); |
| 281 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, | 284 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, |
| 282 widget->GetInputMethod()->GetTextInputType()); | 285 widget->GetInputMethod()->GetTextInputType()); |
| 283 } | 286 } |
| 284 | 287 |
| 285 } // namespace views | 288 } // namespace views |
| OLD | NEW |