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

Unified Diff: ash/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/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 650336b0b871eb1b241af705a6b4c3d02c0adc37..bf85467eb7449dfd047cb1c1802a6f3706c300f0 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -1190,29 +1190,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;
}
std::unique_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
wm::ActivateWindow(window.get());
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