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

Unified Diff: ash/mus/accelerators/accelerator_controller_unittest.cc

Issue 2323863002: Separate debugging and developer accelerators (Closed)
Patch Set: Oshima's comments AND Rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ash/mus/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/mus/accelerators/accelerator_controller_unittest.cc b/ash/mus/accelerators/accelerator_controller_unittest.cc
index 16bc53b6df2be705767cb0632e25dc0448ed893e..8b5b7186c8e669b897aad47f9fcc47a6aa007999 100644
--- a/ash/mus/accelerators/accelerator_controller_unittest.cc
+++ b/ash/mus/accelerators/accelerator_controller_unittest.cc
@@ -1155,29 +1155,30 @@ TEST_F(AcceleratorControllerTest, DisallowedAtModalWindow) {
std::set<AcceleratorAction> all_debug_actions;
for (size_t i = 0; i < kDebugAcceleratorDataLength; ++i)
all_debug_actions.insert(kDebugAcceleratorData[i].action);
+ std::set<AcceleratorAction> all_dev_actions;
+ for (size_t i = 0; i < kDeveloperAcceleratorDataLength; ++i)
+ all_dev_actions.insert(kDeveloperAcceleratorData[i].action);
std::set<AcceleratorAction> actionsAllowedAtModalWindow;
for (size_t k = 0; k < kActionsAllowedAtModalWindowLength; ++k)
actionsAllowedAtModalWindow.insert(kActionsAllowedAtModalWindow[k]);
- for (std::set<AcceleratorAction>::const_iterator it =
- actionsAllowedAtModalWindow.begin();
- it != actionsAllowedAtModalWindow.end(); ++it) {
- EXPECT_TRUE(all_actions.find(*it) != all_actions.end() ||
- all_debug_actions.find(*it) != all_debug_actions.end())
+ for (const auto& action : actionsAllowedAtModalWindow) {
+ EXPECT_TRUE(all_actions.find(action) != all_actions.end() ||
+ all_debug_actions.find(action) != all_debug_actions.end() ||
+ all_dev_actions.find(action) != all_dev_actions.end())
<< " action from kActionsAllowedAtModalWindow"
- << " not found in kAcceleratorData or kDebugAcceleratorData. "
- << "action: " << *it;
+ << " not found in kAcceleratorData, kDebugAcceleratorData or"
+ << " kDeveloperAcceleratorData action: " << action;
}
WmWindow* window =
mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
window->Activate();
WmShell::Get()->SimulateModalWindowOpenForTesting(true);
- for (std::set<AcceleratorAction>::const_iterator it = all_actions.begin();
- it != all_actions.end(); ++it) {
- if (actionsAllowedAtModalWindow.find(*it) ==
+ for (const auto& action : all_actions) {
+ if (actionsAllowedAtModalWindow.find(action) ==
actionsAllowedAtModalWindow.end()) {
- EXPECT_TRUE(GetController()->PerformActionIfEnabled(*it))
- << " for action (disallowed at modal window): " << *it;
+ EXPECT_TRUE(GetController()->PerformActionIfEnabled(action))
+ << " for action (disallowed at modal window): " << action;
}
}
// Testing of top row (F5-F10) accelerators that should still work

Powered by Google App Engine
This is Rietveld 408576698