Chromium Code Reviews| 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 65441b602bed50f81f989267aa1a453ba7c8fa6e..4fdf884869eb4f35982975dde8f60e91ce8f2c82 100644 |
| --- a/chrome/browser/extensions/platform_app_browsertest.cc |
| +++ b/chrome/browser/extensions/platform_app_browsertest.cc |
| @@ -104,6 +104,27 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWithContextMenu) { |
| ASSERT_FALSE(menu->HasCommandWithId(IDC_SAVE_PAGE)); |
| } |
| +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWithContextMenuItems) { |
| + ExtensionTestMessageListener launched_listener("Launched", false); |
| + LoadAndLaunchPlatformApp("context_menu2"); |
|
Mihai Parparita -not on Chrome
2012/08/16 19:58:02
I think you missed adding the new test app to the
|
| + |
| + // 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 two context menu item. These should both be in |
| + // the top level menu (unlike with regular extensions) |
| + WebContents* web_contents = GetFirstShellWindowWebContents(); |
| + ASSERT_TRUE(web_contents); |
| + WebKit::WebContextMenuData data; |
| + content::ContextMenuParams params(data); |
| + PlatformAppContextMenu* menu = new PlatformAppContextMenu(web_contents, |
| + params); |
| + menu->Init(); |
| + ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST)); |
| + ASSERT_TRUE(menu->HasCommandWithId(IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST+1)); |
|
Mihai Parparita -not on Chrome
2012/08/16 19:58:02
Add a space before and after the + sign (see http:
|
| +} |
| + |
| IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowNavigation) { |
| ASSERT_TRUE(StartTestServer()); |
| ASSERT_TRUE(RunPlatformAppTest("platform_apps/navigation")) << message_; |