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

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

Issue 11889004: Fix a bug where the HTML content in a v2 app window wouldn't be initially focused. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable test on gtk Created 7 years, 11 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/ui/cocoa/extensions/native_app_window_cocoa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9b5860ace3d472f4d53205945275c246df2ed6de..7d0dc46f0241d3cc62032f52ac89653162a338e9 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -33,6 +33,8 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_widget_host_view.h"
+#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_intents_dispatcher.h"
#include "content/public/test/test_utils.h"
#include "googleurl/src/gurl.h"
@@ -933,4 +935,17 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) {
EXPECT_TRUE(result_catcher.GetNextResult());
}
+// TODO(jeremya): this doesn't work on GTK yet. See http://crbug.com/159450.
+#if defined(TOOLKIT_GTK)
+#define MAYBE_WebContentsHasFocus DISABLED_WebContentsHasFocus
+#else
+#define MAYBE_WebContentsHasFocus WebContentsHasFocus
+#endif
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WebContentsHasFocus) {
+ const Extension* extension = LoadAndLaunchPlatformApp("minimal");
+ ShellWindow* window = CreateShellWindow(extension);
+ EXPECT_TRUE(window->web_contents()->GetRenderWidgetHostView()->HasFocus());
+ CloseShellWindow(window);
+}
+
} // namespace extensions
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698