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

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

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « chrome/test/base/testing_profile_manager.h ('k') | chrome/test/chromedriver/chrome_impl.h » ('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 "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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 void WaitForHistoryToLoad(HistoryService* history_service) { 417 void WaitForHistoryToLoad(HistoryService* history_service) {
418 content::WindowedNotificationObserver history_loaded_observer( 418 content::WindowedNotificationObserver history_loaded_observer(
419 chrome::NOTIFICATION_HISTORY_LOADED, 419 chrome::NOTIFICATION_HISTORY_LOADED,
420 content::NotificationService::AllSources()); 420 content::NotificationService::AllSources());
421 if (!history_service->BackendLoaded()) 421 if (!history_service->BackendLoaded())
422 history_loaded_observer.Wait(); 422 history_loaded_observer.Wait();
423 } 423 }
424 424
425 void DownloadURL(Browser* browser, const GURL& download_url) { 425 void DownloadURL(Browser* browser, const GURL& download_url) {
426 ScopedTempDir downloads_directory; 426 base::ScopedTempDir downloads_directory;
427 ASSERT_TRUE(downloads_directory.CreateUniqueTempDir()); 427 ASSERT_TRUE(downloads_directory.CreateUniqueTempDir());
428 browser->profile()->GetPrefs()->SetFilePath( 428 browser->profile()->GetPrefs()->SetFilePath(
429 prefs::kDownloadDefaultDirectory, downloads_directory.path()); 429 prefs::kDownloadDefaultDirectory, downloads_directory.path());
430 430
431 content::DownloadManager* download_manager = 431 content::DownloadManager* download_manager =
432 content::BrowserContext::GetDownloadManager(browser->profile()); 432 content::BrowserContext::GetDownloadManager(browser->profile());
433 scoped_ptr<content::DownloadTestObserver> observer( 433 scoped_ptr<content::DownloadTestObserver> observer(
434 new content::DownloadTestObserverTerminal( 434 new content::DownloadTestObserverTerminal(
435 download_manager, 1, 435 download_manager, 1,
436 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_ACCEPT)); 436 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_ACCEPT));
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 void HistoryEnumerator::HistoryQueryComplete( 726 void HistoryEnumerator::HistoryQueryComplete(
727 const base::Closure& quit_task, 727 const base::Closure& quit_task,
728 HistoryService::Handle request_handle, 728 HistoryService::Handle request_handle,
729 history::QueryResults* results) { 729 history::QueryResults* results) {
730 for (size_t i = 0; i < results->size(); ++i) 730 for (size_t i = 0; i < results->size(); ++i)
731 urls_.push_back((*results)[i].url()); 731 urls_.push_back((*results)[i].url());
732 quit_task.Run(); 732 quit_task.Run();
733 } 733 }
734 734
735 } // namespace ui_test_utils 735 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | chrome/test/chromedriver/chrome_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698