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

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

Issue 9235002: Enable devtools via context menu in platform apps and popup extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed stuffup and tests Created 8 years, 10 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/extensions/platform_app_browsertest.cc
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc
index abde2eedc0e880594e1b4738ff8b590bbd7cf26c..5bd33c10193c5ddd9900f0983cf176d907a55420 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -141,7 +141,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_EmptyContextMenu) {
LoadAndLaunchPlatformApp("empty");
// The empty app doesn't add any context menu items, so its menu should
- // be empty.
+ // only include the developer tools.
WebContents* web_contents = GetFirstPlatformAppWebContents();
ASSERT_TRUE(web_contents);
WebKit::WebContextMenuData data;
@@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_EmptyContextMenu) {
PlatformAppContextMenu* menu = new PlatformAppContextMenu(web_contents,
params);
menu->Init();
- ASSERT_FALSE(menu->menu_model().GetItemCount());
+ ASSERT_EQ(1, menu->menu_model().GetItemCount());
}
// Disabled until shell windows are implemented for non-GTK, non-Views toolkits.
@@ -166,7 +166,8 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWithContextMenu) {
ASSERT_TRUE(listener1.WaitUntilSatisfied());
// The context_menu app has one context menu item. This is all that should
msw 2012/02/07 00:34:57 nit: remove "This is all that should be in the men
benwells 2012/02/08 03:49:16 Done.
- // be in the menu, there should be no seperator.
+ // be in the menu, and should be accompanied by a seperator and the
+ // developer tools.
WebContents* web_contents = GetFirstPlatformAppWebContents();
ASSERT_TRUE(web_contents);
WebKit::WebContextMenuData data;
@@ -174,7 +175,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWithContextMenu) {
PlatformAppContextMenu* menu = new PlatformAppContextMenu(web_contents,
params);
menu->Init();
- ASSERT_EQ(1, menu->menu_model().GetItemCount());
+ ASSERT_EQ(3, menu->menu_model().GetItemCount());
}
// Disabled until shell windows are implemented for non-GTK, non-Views toolkits.

Powered by Google App Engine
This is Rietveld 408576698