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

Unified Diff: chrome/browser/extensions/extension_context_menu_browsertest.cc

Issue 11226037: Incognito-allowed package apps produce duplicate items in context menu (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed unittest Created 8 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_context_menu_browsertest.cc
diff --git a/chrome/browser/extensions/extension_context_menu_browsertest.cc b/chrome/browser/extensions/extension_context_menu_browsertest.cc
index 60bfa3e8802bb56d9d7d663d7d5c476b7b4348be..d6586c694edd8cdaf0e6fab754d052f42d492e99 100644
--- a/chrome/browser/extensions/extension_context_menu_browsertest.cc
+++ b/chrome/browser/extensions/extension_context_menu_browsertest.cc
@@ -566,3 +566,22 @@ IN_PROC_BROWSER_TEST_F(ExtensionContextMenuBrowserLazyTest, EventPage) {
EXPECT_TRUE(menu->IsCommandIdChecked(command_id));
ASSERT_TRUE(listener.WaitUntilSatisfied());
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionContextMenuBrowserTest,
+ IncognitoSplitContextMenuCount) {
+ ExtensionTestMessageListener created("created item regular", false);
+ ExtensionTestMessageListener created_incognito("created item incognito",
+ false);
+
+ // Create an incognito profile.
+ ASSERT_TRUE(browser()->profile()->GetOffTheRecordProfile());
+ ASSERT_TRUE(LoadContextMenuExtensionIncognito("incognito"));
+
+ // Wait for the extension's processes to tell us they've created an item.
+ ASSERT_TRUE(created.WaitUntilSatisfied());
+ ASSERT_TRUE(created_incognito.WaitUntilSatisfied());
+ ASSERT_EQ(2u, GetItems().size());
+
+ browser()->profile()->DestroyOffTheRecordProfile();
+ ASSERT_EQ(1u, GetItems().size());
+}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698