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

Side by Side Diff: ash/accelerators/accelerator_table_unittest.cc

Issue 10388230: Allow Control+Shift+Q on lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set> 5 #include <set>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 20 matching lines...) Expand all
31 for (size_t i = 0; i < kAcceleratorDataLength; ++i) { 31 for (size_t i = 0; i < kAcceleratorDataLength; ++i) {
32 const AcceleratorData& entry = kAcceleratorData[i]; 32 const AcceleratorData& entry = kAcceleratorData[i];
33 EXPECT_TRUE(acclerators.insert(entry).second) 33 EXPECT_TRUE(acclerators.insert(entry).second)
34 << "Duplicated accelerator: " << entry.trigger_on_press << ", " 34 << "Duplicated accelerator: " << entry.trigger_on_press << ", "
35 << entry.keycode << ", " << (entry.modifiers & ui::EF_SHIFT_DOWN) 35 << entry.keycode << ", " << (entry.modifiers & ui::EF_SHIFT_DOWN)
36 << ", " << (entry.modifiers & ui::EF_CONTROL_DOWN) << ", " 36 << ", " << (entry.modifiers & ui::EF_CONTROL_DOWN) << ", "
37 << (entry.modifiers & ui::EF_ALT_DOWN); 37 << (entry.modifiers & ui::EF_ALT_DOWN);
38 } 38 }
39 } 39 }
40 40
41 TEST(AcceleratorTableTest, CheckDuplicatedActionsAllowedAtLoginScreen) { 41 TEST(AcceleratorTableTest, CheckDuplicatedActionsAllowedAtLoginOrLockScreen) {
42 std::set<AcceleratorAction> actions; 42 std::set<AcceleratorAction> actions;
43 for (size_t i = 0; i < kActionsAllowedAtLoginScreenLength; ++i) { 43 for (size_t i = 0; i < kActionsAllowedAtLoginOrLockScreenLength; ++i) {
44 EXPECT_TRUE(actions.insert(kActionsAllowedAtLoginScreen[i]).second) 44 EXPECT_TRUE(actions.insert(kActionsAllowedAtLoginOrLockScreen[i]).second)
45 << "Duplicated action: " << kActionsAllowedAtLoginScreen[i]; 45 << "Duplicated action: " << kActionsAllowedAtLoginOrLockScreen[i];
46 }
47 for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i) {
48 EXPECT_TRUE(actions.insert(kActionsAllowedAtLockScreen[i]).second)
49 << "Duplicated action: " << kActionsAllowedAtLockScreen[i];
46 } 50 }
47 } 51 }
48 52
49 } // namespace ash 53 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698