| 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/base/accelerators/accelerator_manager.h" | 5 #include "ui/base/accelerators/accelerator_manager.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/base/events.h" | 9 #include "ui/base/events/event_constants.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 namespace test { | 13 namespace test { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 class TestTarget : public AcceleratorTarget { | 17 class TestTarget : public AcceleratorTarget { |
| 18 public: | 18 public: |
| 19 TestTarget() : accelerator_pressed_count_(0) {} | 19 TestTarget() : accelerator_pressed_count_(0) {} |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 << text << ", " << test_text; // different modifiers | 174 << text << ", " << test_text; // different modifiers |
| 175 } | 175 } |
| 176 | 176 |
| 177 EXPECT_EQ(last_count + 1, target.accelerator_pressed_count()) << text; | 177 EXPECT_EQ(last_count + 1, target.accelerator_pressed_count()) << text; |
| 178 manager_.UnregisterAll(&target); | 178 manager_.UnregisterAll(&target); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace test | 182 } // namespace test |
| 183 } // namespace ui | 183 } // namespace ui |
| OLD | NEW |