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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc

Issue 453993002: IsCommandIdEnabled should not fall though if the base did handle the command id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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: chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
index ff5c89adb9f6996716894ec5f09be6429ddd19de..52c746f2e2ca97801784250fd2970473523ab7ab 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
@@ -289,3 +289,12 @@ TEST_F(RenderViewContextMenuPrefsTest,
EXPECT_FALSE(
menu->IsCommandIdEnabled(IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD));
}
+
+// Make sure the checking custom command id that is not enabled will not
+// cause DCHECK failure.
+TEST_F(RenderViewContextMenuPrefsTest,
+ IsCustomCommandIdEnabled) {
+ scoped_ptr<TestRenderViewContextMenu> menu(CreateContextMenu());
+
+ EXPECT_FALSE(menu->IsCommandIdEnabled(IDC_CONTENT_CONTEXT_CUSTOM_FIRST));
+}

Powered by Google App Engine
This is Rietveld 408576698