Index: chrome/browser/extensions/platform_app_browsertest.cc |
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc |
index da77893260beac04e3476220f861bbe684e0b8ae..410f1ac9a3c2fc46192717f5733ffde8e1609173 100644 |
--- a/chrome/browser/extensions/platform_app_browsertest.cc |
+++ b/chrome/browser/extensions/platform_app_browsertest.cc |
@@ -102,6 +102,34 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWithContextMenu) { |
ASSERT_TRUE(menu->HasCommandWithId(IDC_RELOAD)); |
ASSERT_FALSE(menu->HasCommandWithId(IDC_BACK)); |
ASSERT_FALSE(menu->HasCommandWithId(IDC_SAVE_PAGE)); |
+ ASSERT_FALSE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_UNDO)); |
+} |
+ |
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWithContextMenuTextField) { |
+ ExtensionTestMessageListener launched_listener("Launched", false); |
+ LoadAndLaunchPlatformApp("context_menu"); |
+ |
+ // Wait for the extension to tell us it's initialized its context menus and |
+ // launched a window. |
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
+ |
+ // The context_menu app has one context menu item. This, along with a |
+ // separator and the developer tools, is all that should be in the menu. |
+ WebContents* web_contents = GetFirstShellWindowWebContents(); |
+ ASSERT_TRUE(web_contents); |
+ WebKit::WebContextMenuData data; |
+ content::ContextMenuParams params(data); |
+ params.is_editable = true; |
+ PlatformAppContextMenu* menu = new PlatformAppContextMenu(web_contents, |
+ params); |
+ menu->Init(); |
+ ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST)); |
+ ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_INSPECTELEMENT)); |
+ ASSERT_TRUE(menu->HasCommandWithId(IDC_RELOAD)); |
+ ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_UNDO)); |
+ ASSERT_TRUE(menu->HasCommandWithId(IDC_CONTENT_CONTEXT_COPY)); |
+ ASSERT_FALSE(menu->HasCommandWithId(IDC_BACK)); |
+ ASSERT_FALSE(menu->HasCommandWithId(IDC_SAVE_PAGE)); |
} |
IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWithContextMenuClicked) { |