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

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

Issue 10977088: Fix for Ash shortcuts unexpectedly working in system model dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: impl. of review comments Created 8 years, 2 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/accelerators/accelerator_table.cc ('k') | ash/shell.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 (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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 for (size_t i = 0; i < kActionsAllowedAtLoginOrLockScreenLength; ++i) { 51 for (size_t i = 0; i < kActionsAllowedAtLoginOrLockScreenLength; ++i) {
52 EXPECT_TRUE(actions.insert(kActionsAllowedAtLoginOrLockScreen[i]).second) 52 EXPECT_TRUE(actions.insert(kActionsAllowedAtLoginOrLockScreen[i]).second)
53 << "Duplicated action: " << kActionsAllowedAtLoginOrLockScreen[i]; 53 << "Duplicated action: " << kActionsAllowedAtLoginOrLockScreen[i];
54 } 54 }
55 for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i) { 55 for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i) {
56 EXPECT_TRUE(actions.insert(kActionsAllowedAtLockScreen[i]).second) 56 EXPECT_TRUE(actions.insert(kActionsAllowedAtLockScreen[i]).second)
57 << "Duplicated action: " << kActionsAllowedAtLockScreen[i]; 57 << "Duplicated action: " << kActionsAllowedAtLockScreen[i];
58 } 58 }
59 } 59 }
60 60
61 TEST(AcceleratorTableTest, CheckDuplicatedActionsAllowedAtModalWindow) {
62 std::set<AcceleratorAction> actions;
63 for (size_t i = 0; i < kActionsAllowedAtModalWindowLength; ++i) {
64 EXPECT_TRUE(actions.insert(kActionsAllowedAtModalWindow[i]).second)
65 << "Duplicated action: " << kActionsAllowedAtModalWindow[i]
66 << " at index: " << i;
67 }
68 }
69
61 } // namespace ash 70 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698