| Index: chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
|
| diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
|
| index d2101d8366a1c62b04bde1fedd6356b9b6204faa..757ba33395f08553d8e28c9e83e6a0bdd587195e 100644
|
| --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
|
| +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
|
| @@ -419,7 +419,7 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfileEntryPresent) {
|
| }
|
|
|
| // Create one additional profile, but do not yet open windows in it.
|
| - CreateSecondaryProfile(1);
|
| + Profile* profile = CreateSecondaryProfile(1);
|
|
|
| {
|
| std::unique_ptr<TestRenderViewContextMenu> menu(
|
| @@ -429,8 +429,24 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfileEntryPresent) {
|
| ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB));
|
| ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW));
|
| ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_COPYLINKLOCATION));
|
| - // With two profiles (the current and another profile), no submenu is
|
| - // created. Instead, a single item is added to the main context menu.
|
| + // With the second profile not open, no entry is created.
|
| + ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKINPROFILE));
|
| + ASSERT_FALSE(menu->IsItemPresent(IDC_OPEN_LINK_IN_PROFILE_FIRST));
|
| + }
|
| +
|
| + profiles::FindOrCreateNewWindowForProfile(
|
| + profile, chrome::startup::IS_NOT_PROCESS_STARTUP,
|
| + chrome::startup::IS_NOT_FIRST_RUN, false);
|
| +
|
| + {
|
| + std::unique_ptr<TestRenderViewContextMenu> menu(
|
| + CreateContextMenuMediaTypeNone(GURL("http://www.google.com/"),
|
| + GURL("http://www.google.com/")));
|
| +
|
| + ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB));
|
| + ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW));
|
| + ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_COPYLINKLOCATION));
|
| + // With the second profile open, an inline menu entry is created.
|
| ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKINPROFILE));
|
| ASSERT_TRUE(menu->IsItemPresent(IDC_OPEN_LINK_IN_PROFILE_FIRST));
|
| }
|
|
|