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

Side by Side Diff: content/browser/download/drag_download_file_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/file_util.h" 6 #include "base/file_util.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "content/browser/download/download_file_factory.h" 8 #include "content/browser/download/download_file_factory.h"
9 #include "content/browser/download/download_file_impl.h" 9 #include "content/browser/download/download_file_impl.h"
10 #include "content/browser/download/download_item_impl.h" 10 #include "content/browser/download/download_item_impl.h"
11 #include "content/browser/download/download_manager_impl.h" 11 #include "content/browser/download/download_manager_impl.h"
12 #include "content/browser/download/drag_download_file.h" 12 #include "content/browser/download/drag_download_file.h"
13 #include "content/browser/download/drag_download_util.h" 13 #include "content/browser/download/drag_download_util.h"
14 #include "content/browser/power_save_blocker.h" 14 #include "content/browser/power_save_blocker.h"
15 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" 15 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
16 #include "content/browser/web_contents/web_contents_impl.h" 16 #include "content/browser/web_contents/web_contents_impl.h"
17 #include "content/public/browser/content_browser_client.h" 17 #include "content/public/browser/content_browser_client.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 BrowserThread::PostTask( 77 BrowserThread::PostTask(
78 BrowserThread::IO, FROM_HERE, 78 BrowserThread::IO, FROM_HERE,
79 base::Bind(&URLRequestMockHTTPJob::AddUrlHandler, mock_base)); 79 base::Bind(&URLRequestMockHTTPJob::AddUrlHandler, mock_base));
80 } 80 }
81 81
82 const FilePath& downloads_directory() const { 82 const FilePath& downloads_directory() const {
83 return downloads_directory_.path(); 83 return downloads_directory_.path();
84 } 84 }
85 85
86 private: 86 private:
87 ScopedTempDir downloads_directory_; 87 base::ScopedTempDir downloads_directory_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(DragDownloadFileTest); 89 DISALLOW_COPY_AND_ASSIGN(DragDownloadFileTest);
90 }; 90 };
91 91
92 IN_PROC_BROWSER_TEST_F(DragDownloadFileTest, DragDownloadFileTest_NetError) { 92 IN_PROC_BROWSER_TEST_F(DragDownloadFileTest, DragDownloadFileTest_NetError) {
93 FilePath name(downloads_directory().AppendASCII( 93 FilePath name(downloads_directory().AppendASCII(
94 "DragDownloadFileTest_NetError.txt")); 94 "DragDownloadFileTest_NetError.txt"));
95 GURL url(URLRequestMockHTTPJob::GetMockUrl(FilePath(FILE_PATH_LITERAL( 95 GURL url(URLRequestMockHTTPJob::GetMockUrl(FilePath(FILE_PATH_LITERAL(
96 "download-test.lib")))); 96 "download-test.lib"))));
97 Referrer referrer; 97 Referrer referrer;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 this, &DragDownloadFileTest::Succeed)); 131 this, &DragDownloadFileTest::Succeed));
132 ON_CALL(*observer, OnDownloadAborted()).WillByDefault(InvokeWithoutArgs( 132 ON_CALL(*observer, OnDownloadAborted()).WillByDefault(InvokeWithoutArgs(
133 this, &DragDownloadFileTest::FailFast)); 133 this, &DragDownloadFileTest::FailFast));
134 file->Start(observer); 134 file->Start(observer);
135 RunMessageLoop(); 135 RunMessageLoop();
136 } 136 }
137 137
138 // TODO(benjhayden): Test Stop(). 138 // TODO(benjhayden): Test Stop().
139 139
140 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/file_metadata_unittest_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698