OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR)); | 190 ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR)); |
191 | 191 |
192 ClickOnView(VIEW_ID_TAB_CONTAINER); | 192 ClickOnView(VIEW_ID_TAB_CONTAINER); |
193 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 193 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
194 | 194 |
195 ClickOnView(VIEW_ID_LOCATION_BAR); | 195 ClickOnView(VIEW_ID_LOCATION_BAR); |
196 ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR)); | 196 ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR)); |
197 } | 197 } |
198 | 198 |
199 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BrowsersRememberFocus) { | 199 // Flaky, http://crbug.com/69034. |
| 200 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FLAKY_BrowsersRememberFocus) { |
200 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 201 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
201 ASSERT_TRUE(test_server()->Start()); | 202 ASSERT_TRUE(test_server()->Start()); |
202 | 203 |
203 // First we navigate to our test page. | 204 // First we navigate to our test page. |
204 GURL url = test_server()->GetURL(kSimplePage); | 205 GURL url = test_server()->GetURL(kSimplePage); |
205 ui_test_utils::NavigateToURL(browser(), url); | 206 ui_test_utils::NavigateToURL(browser(), url); |
206 | 207 |
207 gfx::NativeWindow window = browser()->window()->GetNativeHandle(); | 208 gfx::NativeWindow window = browser()->window()->GetNativeHandle(); |
208 | 209 |
209 // The focus should be on the Tab contents. | 210 // The focus should be on the Tab contents. |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 ui_test_utils::CrashTab(browser()->GetSelectedTabContents()); | 834 ui_test_utils::CrashTab(browser()->GetSelectedTabContents()); |
834 browser()->Reload(CURRENT_TAB); | 835 browser()->Reload(CURRENT_TAB); |
835 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); | 836 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); |
836 | 837 |
837 // Focus should now be on the tab contents. | 838 // Focus should now be on the tab contents. |
838 browser()->ShowDownloadsTab(); | 839 browser()->ShowDownloadsTab(); |
839 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 840 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
840 } | 841 } |
841 | 842 |
842 } // namespace | 843 } // namespace |
OLD | NEW |