| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ui/base/event.h" | 10 #include "ui/base/events/event.h" |
| 11 #include "ui/views/controls/button/text_button.h" | 11 #include "ui/views/controls/button/text_button.h" |
| 12 #include "ui/views/focus/accelerator_handler.h" | 12 #include "ui/views/focus/accelerator_handler.h" |
| 13 #include "ui/views/focus/focus_manager_test.h" | 13 #include "ui/views/focus/focus_manager_test.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 class MessageTrackingView : public View { | 20 class MessageTrackingView : public View { |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 PostKeyUp(ui::VKEY_0); | 273 PostKeyUp(ui::VKEY_0); |
| 274 run_loop.reset(new base::RunLoop(&accelerator_handler)); | 274 run_loop.reset(new base::RunLoop(&accelerator_handler)); |
| 275 run_loop->RunUntilIdle(); | 275 run_loop->RunUntilIdle(); |
| 276 EXPECT_TRUE(mtv->keys_pressed().empty()); | 276 EXPECT_TRUE(mtv->keys_pressed().empty()); |
| 277 EXPECT_TRUE(mtv->keys_released().empty()); | 277 EXPECT_TRUE(mtv->keys_released().empty()); |
| 278 EXPECT_TRUE(mtv->accelerator_pressed()); | 278 EXPECT_TRUE(mtv->accelerator_pressed()); |
| 279 mtv->Reset(); | 279 mtv->Reset(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace views | 282 } // namespace views |
| OLD | NEW |