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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 BrowserAddedObserver observer; | 213 BrowserAddedObserver observer; |
214 new_browser = observer.WaitForSingleNewBrowser(); | 214 new_browser = observer.WaitForSingleNewBrowser(); |
215 // The new browser should never be in |excluded_browsers|. | 215 // The new browser should never be in |excluded_browsers|. |
216 DCHECK(!ContainsKey(excluded_browsers, new_browser)); | 216 DCHECK(!ContainsKey(excluded_browsers, new_browser)); |
217 } | 217 } |
218 return new_browser; | 218 return new_browser; |
219 } | 219 } |
220 | 220 |
221 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url) { | 221 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url) { |
222 chrome::OpenURLOffTheRecord(profile, url, chrome::HOST_DESKTOP_TYPE_NATIVE); | 222 chrome::OpenURLOffTheRecord(profile, url, chrome::HOST_DESKTOP_TYPE_NATIVE); |
223 Browser* browser = browser::FindTabbedBrowser( | 223 Browser* browser = chrome::FindTabbedBrowser( |
224 profile->GetOffTheRecordProfile(), | 224 profile->GetOffTheRecordProfile(), |
225 false, | 225 false, |
226 chrome::HOST_DESKTOP_TYPE_NATIVE); | 226 chrome::HOST_DESKTOP_TYPE_NATIVE); |
227 WaitForNavigations(&chrome::GetActiveWebContents(browser)->GetController(), | 227 WaitForNavigations(&chrome::GetActiveWebContents(browser)->GetController(), |
228 1); | 228 1); |
229 return browser; | 229 return browser; |
230 } | 230 } |
231 | 231 |
232 void NavigateToURL(chrome::NavigateParams* params) { | 232 void NavigateToURL(chrome::NavigateParams* params) { |
233 content::TestNavigationObserver observer( | 233 content::TestNavigationObserver observer( |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 void HistoryEnumerator::HistoryQueryComplete( | 704 void HistoryEnumerator::HistoryQueryComplete( |
705 const base::Closure& quit_task, | 705 const base::Closure& quit_task, |
706 HistoryService::Handle request_handle, | 706 HistoryService::Handle request_handle, |
707 history::QueryResults* results) { | 707 history::QueryResults* results) { |
708 for (size_t i = 0; i < results->size(); ++i) | 708 for (size_t i = 0; i < results->size(); ++i) |
709 urls_.push_back((*results)[i].url()); | 709 urls_.push_back((*results)[i].url()); |
710 quit_task.Run(); | 710 quit_task.Run(); |
711 } | 711 } |
712 | 712 |
713 } // namespace ui_test_utils | 713 } // namespace ui_test_utils |
OLD | NEW |