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

Unified Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 13227002: Revise NativeWidgetWin focus hack; force focus on restore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore FocusManager::RestoreFocusedView return values. Created 7 years, 9 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/views/find_bar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_focus_uitest.cc
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 3e0d748857b4540d2f18ea217fe95d3f0d7b2083..c23fe5f8a8e74107d3151aa4540a6df7a74bcb84 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -234,8 +234,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_ClickingMovesFocus) {
ASSERT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
}
-// Flaky, http://crbug.com/69034.
-IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_BrowsersRememberFocus) {
+IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BrowsersRememberFocus) {
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
ASSERT_TRUE(test_server()->Start());
@@ -257,7 +256,12 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_BrowsersRememberFocus) {
// Hide the window, show it again, the focus should not have changed.
ui_test_utils::HideNativeWindow(window);
ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(window));
+#if defined(OS_CHROMEOS)
+ // Chrome OS currently focuses the tab content on window restoration.
Ben Goodger (Google) 2013/04/02 20:32:14 why does cros differ?
msw 2013/04/03 01:54:16 I filed http://crbug.com/225963 and updated the co
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
+#else
ASSERT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
+#endif
// The rest of this test does not make sense on Linux because the behavior
// of Activate() is not well defined and can vary by window manager.
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698