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 <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 Loading... |
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 | |
70 } // namespace ash | 61 } // namespace ash |
OLD | NEW |