OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 909 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
910 } | 910 } |
911 | 911 |
912 // Tests that focus goes where expected when using reload on a crashed tab. | 912 // Tests that focus goes where expected when using reload on a crashed tab. |
913 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_FocusOnReloadCrashedTab) { | 913 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_FocusOnReloadCrashedTab) { |
914 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 914 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
915 ASSERT_TRUE(test_server()->Start()); | 915 ASSERT_TRUE(test_server()->Start()); |
916 | 916 |
917 // Open a regular page, crash, reload. | 917 // Open a regular page, crash, reload. |
918 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage)); | 918 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage)); |
919 ui_test_utils::CrashTab(chrome::GetActiveWebContents(browser())); | 919 content::CrashTab(chrome::GetActiveWebContents(browser())); |
920 { | 920 { |
921 content::WindowedNotificationObserver observer( | 921 content::WindowedNotificationObserver observer( |
922 content::NOTIFICATION_LOAD_STOP, | 922 content::NOTIFICATION_LOAD_STOP, |
923 content::Source<NavigationController>( | 923 content::Source<NavigationController>( |
924 &chrome::GetActiveWebContents(browser())->GetController())); | 924 &chrome::GetActiveWebContents(browser())->GetController())); |
925 chrome::Reload(browser(), CURRENT_TAB); | 925 chrome::Reload(browser(), CURRENT_TAB); |
926 observer.Wait(); | 926 observer.Wait(); |
927 } | 927 } |
928 | 928 |
929 // Focus should now be on the tab contents. | 929 // Focus should now be on the tab contents. |
930 chrome::ShowDownloads(browser()); | 930 chrome::ShowDownloads(browser()); |
931 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 931 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
932 } | 932 } |
933 | 933 |
934 } // namespace | 934 } // namespace |
OLD | NEW |