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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_browsertest.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
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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/browsing_data/browsing_data_helper.h" 7 #include "chrome/browser/browsing_data/browsing_data_helper.h"
8 #include "chrome/browser/browsing_data/browsing_data_remover.h" 8 #include "chrome/browser/browsing_data/browsing_data_remover.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 content::Source<Profile>(browser()->profile())); 58 content::Source<Profile>(browser()->profile()));
59 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForPeriod( 59 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForPeriod(
60 browser()->profile(), BrowsingDataRemover::LAST_HOUR); 60 browser()->profile(), BrowsingDataRemover::LAST_HOUR);
61 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); 61 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB);
62 signal.Wait(); 62 signal.Wait();
63 } 63 }
64 }; 64 };
65 65
66 // Test BrowsingDataRemover for downloads. 66 // Test BrowsingDataRemover for downloads.
67 IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, Download) { 67 IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, Download) {
68 ScopedTempDir downloads_directory; 68 base::ScopedTempDir downloads_directory;
69 ASSERT_TRUE(downloads_directory.CreateUniqueTempDir()); 69 ASSERT_TRUE(downloads_directory.CreateUniqueTempDir());
70 browser()->profile()->GetPrefs()->SetFilePath( 70 browser()->profile()->GetPrefs()->SetFilePath(
71 prefs::kDownloadDefaultDirectory, downloads_directory.path()); 71 prefs::kDownloadDefaultDirectory, downloads_directory.path());
72 72
73 // Start a download. 73 // Start a download.
74 content::DownloadManager* download_manager = 74 content::DownloadManager* download_manager =
75 content::BrowserContext::GetDownloadManager(browser()->profile()); 75 content::BrowserContext::GetDownloadManager(browser()->profile());
76 scoped_ptr<content::DownloadTestObserver> observer( 76 scoped_ptr<content::DownloadTestObserver> observer(
77 new content::DownloadTestObserverTerminal( 77 new content::DownloadTestObserverTerminal(
78 download_manager, 1, 78 download_manager, 1,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ui_test_utils::NavigateToURL(browser(), url); 110 ui_test_utils::NavigateToURL(browser(), url);
111 RunScriptAndCheckResult(L"createTable()", "done"); 111 RunScriptAndCheckResult(L"createTable()", "done");
112 RunScriptAndCheckResult(L"insertRecord('text2')", "done"); 112 RunScriptAndCheckResult(L"insertRecord('text2')", "done");
113 RunScriptAndCheckResult(L"getRecords()", "text2"); 113 RunScriptAndCheckResult(L"getRecords()", "text2");
114 } 114 }
115 115
116 // Profile::ClearNetworkingHistorySince should be exercised here too see whether 116 // Profile::ClearNetworkingHistorySince should be exercised here too see whether
117 // the call gets delegated through ProfileIO[Impl]Data properly, which is hard 117 // the call gets delegated through ProfileIO[Impl]Data properly, which is hard
118 // to write unit-tests for. Currently this is done by both of the above tests. 118 // to write unit-tests for. Currently this is done by both of the above tests.
119 // Add standalone test if this changes. 119 // Add standalone test if this changes.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698