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

Side by Side Diff: content/browser/download/download_browsertest.cc

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/download/download_item_impl.cc » ('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 // This file contains download browser tests that are known to be runnable 5 // This file contains download browser tests that are known to be runnable
6 // in a pure content context. Over time tests should be migrated here. 6 // in a pure content context. Over time tests should be migrated here.
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 WaitForData(download, GetSafeBufferChunk()); 1203 WaitForData(download, GetSafeBufferChunk());
1204 1204
1205 RecordingDownloadObserver recorder(download); 1205 RecordingDownloadObserver recorder(download);
1206 1206
1207 ReleaseRSTAndConfirmInterruptForResume(download); 1207 ReleaseRSTAndConfirmInterruptForResume(download);
1208 ConfirmFileStatusForResume( 1208 ConfirmFileStatusForResume(
1209 download, true, GetSafeBufferChunk(), GetSafeBufferChunk() * 3, 1209 download, true, GetSafeBufferChunk(), GetSafeBufferChunk() * 3,
1210 base::FilePath(FILE_PATH_LITERAL("rangereset.crdownload"))); 1210 base::FilePath(FILE_PATH_LITERAL("rangereset.crdownload")));
1211 1211
1212 // Delete the intermediate file. 1212 // Delete the intermediate file.
1213 file_util::Delete(download->GetFullPath(), false); 1213 base::Delete(download->GetFullPath(), false);
1214 1214
1215 DownloadUpdatedObserver completion_observer( 1215 DownloadUpdatedObserver completion_observer(
1216 download, base::Bind(DownloadCompleteFilter)); 1216 download, base::Bind(DownloadCompleteFilter));
1217 download->Resume(); 1217 download->Resume();
1218 completion_observer.WaitForEvent(); 1218 completion_observer.WaitForEvent();
1219 1219
1220 ConfirmFileStatusForResume( 1220 ConfirmFileStatusForResume(
1221 download, true, GetSafeBufferChunk() * 3, GetSafeBufferChunk() * 3, 1221 download, true, GetSafeBufferChunk() * 3, GetSafeBufferChunk() * 3,
1222 base::FilePath(FILE_PATH_LITERAL("rangereset"))); 1222 base::FilePath(FILE_PATH_LITERAL("rangereset")));
1223 1223
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 // Start the second download and wait until it's done. The test server is 1566 // Start the second download and wait until it's done. The test server is
1567 // single threaded. The response to this download request should follow the 1567 // single threaded. The response to this download request should follow the
1568 // response to the previous resumption request. 1568 // response to the previous resumption request.
1569 GURL url2(test_server()->GetURL("rangereset?size=100&rst_limit=0&token=x")); 1569 GURL url2(test_server()->GetURL("rangereset?size=100&rst_limit=0&token=x"));
1570 DownloadAndWait(shell(), url2, DownloadItem::COMPLETE); 1570 DownloadAndWait(shell(), url2, DownloadItem::COMPLETE);
1571 1571
1572 EXPECT_TRUE(EnsureNoPendingDownloads()); 1572 EXPECT_TRUE(EnsureNoPendingDownloads());
1573 } 1573 }
1574 1574
1575 } // namespace content 1575 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698