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

Side by Side Diff: chrome/test/base/ui_test_utils.cc

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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
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 "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 16 matching lines...) Expand all
27 #include "base/utf_string_conversions.h" 27 #include "base/utf_string_conversions.h"
28 #include "base/values.h" 28 #include "base/values.h"
29 #include "chrome/browser/bookmarks/bookmark_model.h" 29 #include "chrome/browser/bookmarks/bookmark_model.h"
30 #include "chrome/browser/browser_process.h" 30 #include "chrome/browser/browser_process.h"
31 #include "chrome/browser/profiles/profile.h" 31 #include "chrome/browser/profiles/profile.h"
32 #include "chrome/browser/search_engines/template_url_service.h" 32 #include "chrome/browser/search_engines/template_url_service.h"
33 #include "chrome/browser/search_engines/template_url_service_test_util.h" 33 #include "chrome/browser/search_engines/template_url_service_test_util.h"
34 #include "chrome/browser/tab_contents/thumbnail_generator.h" 34 #include "chrome/browser/tab_contents/thumbnail_generator.h"
35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
36 #include "chrome/browser/ui/browser.h" 36 #include "chrome/browser/ui/browser.h"
37 #include "chrome/browser/ui/browser_finder.h"
37 #include "chrome/browser/ui/browser_list.h" 38 #include "chrome/browser/ui/browser_list.h"
38 #include "chrome/browser/ui/browser_navigator.h" 39 #include "chrome/browser/ui/browser_navigator.h"
39 #include "chrome/browser/ui/browser_window.h" 40 #include "chrome/browser/ui/browser_window.h"
40 #include "chrome/browser/ui/find_bar/find_notification_details.h" 41 #include "chrome/browser/ui/find_bar/find_notification_details.h"
41 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 42 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 43 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
43 #include "chrome/common/chrome_notification_types.h" 44 #include "chrome/common/chrome_notification_types.h"
44 #include "chrome/common/chrome_paths.h" 45 #include "chrome/common/chrome_paths.h"
45 #include "chrome/common/extensions/extension_action.h" 46 #include "chrome/common/extensions/extension_action.h"
46 #include "chrome/test/automation/javascript_execution_controller.h" 47 #include "chrome/test/automation/javascript_execution_controller.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (new_browser == NULL) { 387 if (new_browser == NULL) {
387 new_browser = WaitForNewBrowser(); 388 new_browser = WaitForNewBrowser();
388 // The new browser should never be in |excluded_browsers|. 389 // The new browser should never be in |excluded_browsers|.
389 DCHECK(!ContainsKey(excluded_browsers, new_browser)); 390 DCHECK(!ContainsKey(excluded_browsers, new_browser));
390 } 391 }
391 return new_browser; 392 return new_browser;
392 } 393 }
393 394
394 void OpenURLOffTheRecord(Profile* profile, const GURL& url) { 395 void OpenURLOffTheRecord(Profile* profile, const GURL& url) {
395 Browser::OpenURLOffTheRecord(profile, url); 396 Browser::OpenURLOffTheRecord(profile, url);
396 Browser* browser = BrowserList::FindTabbedBrowser( 397 Browser* browser = browser::FindTabbedBrowser(
397 profile->GetOffTheRecordProfile(), false); 398 profile->GetOffTheRecordProfile(), false);
398 WaitForNavigations(&browser->GetSelectedWebContents()->GetController(), 1); 399 WaitForNavigations(&browser->GetSelectedWebContents()->GetController(), 1);
399 } 400 }
400 401
401 void NavigateToURL(browser::NavigateParams* params) { 402 void NavigateToURL(browser::NavigateParams* params) {
402 TestNavigationObserver observer( 403 TestNavigationObserver observer(
403 content::NotificationService::AllSources(), NULL, 1); 404 content::NotificationService::AllSources(), NULL, 1);
404 browser::Navigate(params); 405 browser::Navigate(params);
405 observer.WaitForObservation( 406 observer.WaitForObservation(
406 base::Bind(&ui_test_utils::RunMessageLoop), 407 base::Bind(&ui_test_utils::RunMessageLoop),
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 int state, 1278 int state,
1278 const base::Closure& followup) { 1279 const base::Closure& followup) {
1279 if (!followup.is_null()) 1280 if (!followup.is_null())
1280 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); 1281 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup);
1281 else 1282 else
1282 ui_controls::SendMouseEvents(button, state); 1283 ui_controls::SendMouseEvents(button, state);
1283 } 1284 }
1284 1285
1285 } // namespace internal 1286 } // namespace internal
1286 } // namespace ui_test_utils 1287 } // namespace ui_test_utils
OLDNEW
« chrome/browser/ui/browser_finder.h ('K') | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698