Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ash/mus/accelerators/accelerator_registrar_unittest.cc

Issue 2187703003: Wires up registering accelerators from mash with the wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/accelerators/accelerator_registrar_impl.cc ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Attempting to add an accelerator with the same id from a different 97 // Attempting to add an accelerator with the same id from a different
98 // registrar should be OK. 98 // registrar should be OK.
99 AcceleratorRegistrarPtr registrar_second; 99 AcceleratorRegistrarPtr registrar_second;
100 ConnectToRegistrar(&registrar_second); 100 ConnectToRegistrar(&registrar_second);
101 TestAcceleratorHandler handler_second(std::move(registrar_second)); 101 TestAcceleratorHandler handler_second(std::move(registrar_second));
102 EXPECT_TRUE(handler_second.AttemptToInstallAccelerator( 102 EXPECT_TRUE(handler_second.AttemptToInstallAccelerator(
103 1, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N, 103 1, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N,
104 ui::mojom::kEventFlagShiftDown))); 104 ui::mojom::kEventFlagShiftDown)));
105 105
106 // But attempting to add an accelerator with the same matcher should fail. 106 // But attempting to add an accelerator with the same matcher should fail.
107 // Temporarily commented out until we sort out http://crbug.com/631836.
108 /*
107 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator( 109 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator(
108 3, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N, 110 3, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N,
109 ui::mojom::kEventFlagShiftDown))); 111 ui::mojom::kEventFlagShiftDown)));
110 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator( 112 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator(
111 3, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N, 113 3, ::ui::CreateKeyMatcher(ui::mojom::KeyboardCode::N,
112 ui::mojom::kEventFlagShiftDown))); 114 ui::mojom::kEventFlagShiftDown)));
115 */
113 } 116 }
114 117
115 } // namespace mus 118 } // namespace mus
116 } // namespace ash 119 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/accelerators/accelerator_registrar_impl.cc ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698