| 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 "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 24 matching lines...) Expand all Loading... |
| 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_commands.h" | 37 #include "chrome/browser/ui/browser_commands.h" |
| 38 #include "chrome/browser/ui/browser_finder.h" | 38 #include "chrome/browser/ui/browser_finder.h" |
| 39 #include "chrome/browser/ui/browser_list.h" | 39 #include "chrome/browser/ui/browser_list.h" |
| 40 #include "chrome/browser/ui/browser_navigator.h" | 40 #include "chrome/browser/ui/browser_navigator.h" |
| 41 #include "chrome/browser/ui/browser_tabstrip.h" | 41 #include "chrome/browser/ui/browser_tabstrip.h" |
| 42 #include "chrome/browser/ui/browser_window.h" | 42 #include "chrome/browser/ui/browser_window.h" |
| 43 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 43 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| 44 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 44 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 45 #include "chrome/browser/ui/host_desktop.h" |
| 45 #include "chrome/browser/ui/omnibox/location_bar.h" | 46 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 46 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 47 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 47 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 48 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 48 #include "chrome/common/chrome_notification_types.h" | 49 #include "chrome/common/chrome_notification_types.h" |
| 49 #include "chrome/common/chrome_paths.h" | 50 #include "chrome/common/chrome_paths.h" |
| 50 #include "chrome/common/extensions/extension_action.h" | 51 #include "chrome/common/extensions/extension_action.h" |
| 51 #include "chrome/common/pref_names.h" | 52 #include "chrome/common/pref_names.h" |
| 52 #include "chrome/test/base/bookmark_load_observer.h" | 53 #include "chrome/test/base/bookmark_load_observer.h" |
| 53 #include "content/public/browser/browser_thread.h" | 54 #include "content/public/browser/browser_thread.h" |
| 54 #include "content/public/browser/dom_operation_notification_details.h" | 55 #include "content/public/browser/dom_operation_notification_details.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (new_browser == NULL) { | 190 if (new_browser == NULL) { |
| 190 BrowserAddedObserver observer; | 191 BrowserAddedObserver observer; |
| 191 new_browser = observer.WaitForSingleNewBrowser(); | 192 new_browser = observer.WaitForSingleNewBrowser(); |
| 192 // The new browser should never be in |excluded_browsers|. | 193 // The new browser should never be in |excluded_browsers|. |
| 193 DCHECK(!ContainsKey(excluded_browsers, new_browser)); | 194 DCHECK(!ContainsKey(excluded_browsers, new_browser)); |
| 194 } | 195 } |
| 195 return new_browser; | 196 return new_browser; |
| 196 } | 197 } |
| 197 | 198 |
| 198 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url) { | 199 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url) { |
| 199 chrome::OpenURLOffTheRecord(profile, url); | 200 chrome::OpenURLOffTheRecord(profile, url, chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 200 Browser* browser = browser::FindTabbedBrowser( | 201 Browser* browser = browser::FindTabbedBrowser( |
| 201 profile->GetOffTheRecordProfile(), false); | 202 profile->GetOffTheRecordProfile(), |
| 203 false, |
| 204 chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 202 WaitForNavigations(&chrome::GetActiveWebContents(browser)->GetController(), | 205 WaitForNavigations(&chrome::GetActiveWebContents(browser)->GetController(), |
| 203 1); | 206 1); |
| 204 return browser; | 207 return browser; |
| 205 } | 208 } |
| 206 | 209 |
| 207 void NavigateToURL(chrome::NavigateParams* params) { | 210 void NavigateToURL(chrome::NavigateParams* params) { |
| 208 content::TestNavigationObserver observer( | 211 content::TestNavigationObserver observer( |
| 209 content::NotificationService::AllSources(), NULL, 1); | 212 content::NotificationService::AllSources(), NULL, 1); |
| 210 chrome::Navigate(params); | 213 chrome::Navigate(params); |
| 211 base::RunLoop run_loop; | 214 base::RunLoop run_loop; |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 void HistoryEnumerator::HistoryQueryComplete( | 739 void HistoryEnumerator::HistoryQueryComplete( |
| 737 const base::Closure& quit_task, | 740 const base::Closure& quit_task, |
| 738 HistoryService::Handle request_handle, | 741 HistoryService::Handle request_handle, |
| 739 history::QueryResults* results) { | 742 history::QueryResults* results) { |
| 740 for (size_t i = 0; i < results->size(); ++i) | 743 for (size_t i = 0; i < results->size(); ++i) |
| 741 urls_.push_back((*results)[i].url()); | 744 urls_.push_back((*results)[i].url()); |
| 742 quit_task.Run(); | 745 quit_task.Run(); |
| 743 } | 746 } |
| 744 | 747 |
| 745 } // namespace ui_test_utils | 748 } // namespace ui_test_utils |
| OLD | NEW |