| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "components/mus/common/event_matcher_util.h" | 12 #include "components/mus/common/event_matcher_util.h" |
| 13 #include "components/mus/public/cpp/window.h" | 13 #include "components/mus/public/cpp/window.h" |
| 14 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" | 14 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
| 16 #include "services/shell/public/cpp/shell_test.h" | 16 #include "services/shell/public/cpp/shell_test.h" |
| 17 | 17 |
| 18 #include "ui/aura/test/aura_test_base.h" |
| 19 #include "ui/views/test/views_test_base.h" |
| 20 |
| 18 using mus::mojom::AcceleratorHandler; | 21 using mus::mojom::AcceleratorHandler; |
| 19 using mus::mojom::AcceleratorHandlerPtr; | 22 using mus::mojom::AcceleratorHandlerPtr; |
| 20 using mus::mojom::AcceleratorRegistrar; | 23 using mus::mojom::AcceleratorRegistrar; |
| 21 using mus::mojom::AcceleratorRegistrarPtr; | 24 using mus::mojom::AcceleratorRegistrarPtr; |
| 22 | 25 |
| 23 namespace mash { | 26 namespace mash { |
| 24 namespace wm { | 27 namespace wm { |
| 25 | 28 |
| 26 class TestAcceleratorHandler : public AcceleratorHandler { | 29 class TestAcceleratorHandler : public AcceleratorHandler { |
| 27 public: | 30 public: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 108 |
| 106 // But attempting to add an accelerator with the same matcher should fail. | 109 // But attempting to add an accelerator with the same matcher should fail. |
| 107 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator( | 110 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator( |
| 108 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, | 111 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, |
| 109 mus::mojom::kEventFlagShiftDown))); | 112 mus::mojom::kEventFlagShiftDown))); |
| 110 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator( | 113 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator( |
| 111 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, | 114 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, |
| 112 mus::mojom::kEventFlagShiftDown))); | 115 mus::mojom::kEventFlagShiftDown))); |
| 113 } | 116 } |
| 114 | 117 |
| 118 class FooTest : public aura::test::AuraTestBase { |
| 119 public: |
| 120 FooTest() {} |
| 121 ~FooTest() override {} |
| 122 }; |
| 123 |
| 124 TEST_F(FooTest, Bar) { |
| 125 EXPECT_TRUE(false); |
| 126 } |
| 127 |
| 128 class ViewsTest : public views::ViewsTestBase { |
| 129 public: |
| 130 ViewsTest() {} |
| 131 ~ViewsTest() override {} |
| 132 }; |
| 133 |
| 134 TEST_F(ViewsTest, Bar) { |
| 135 EXPECT_TRUE(false); |
| 136 } |
| 137 |
| 115 } // namespace wm | 138 } // namespace wm |
| 116 } // namespace mash | 139 } // namespace mash |
| OLD | NEW |