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

Side by Side Diff: chrome/browser/browser_focus_uitest.cc

Issue 10833029: Move ui_test_utils::CrashTab to browser_test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_sanity_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698