Chromium Code Reviews| Index: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc |
| diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc |
| index 0465a7144f8816943a7bde6ada1c5231257968ad..7280bf538f31eb84a58e33b614ddb112b30eaf33 100644 |
| --- a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc |
| +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc |
| @@ -42,6 +42,17 @@ bool TestRenderViewContextMenu::IsItemPresent(int command_id) { |
| return menu_model_.GetIndexOfCommandId(command_id) != -1; |
| } |
| +bool TestRenderViewContextMenu::IsItemInRangePresent(int command_id_first, |
| + int command_id_last) { |
| + DCHECK_LT(command_id_first, command_id_last); |
|
Peter Kasting
2015/06/15 23:45:15
Nit: This should probably be _LE, since it's sane
jochen (gone - plz use gerrit)
2015/06/16 08:00:14
done
|
| + for (int command_id = command_id_first; command_id <= command_id_last; |
| + ++command_id) { |
| + if (IsItemPresent(command_id)) |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| bool TestRenderViewContextMenu::GetMenuModelAndItemIndex( |
| int command_id, |
| MenuModel** found_model, |