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

Side by Side Diff: webkit/fileapi/file_system_mount_point_provider_unittest.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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/scoped_temp_dir.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop.h" 15 #include "base/message_loop.h"
15 #include "base/message_loop_proxy.h" 16 #include "base/message_loop_proxy.h"
16 #include "base/scoped_temp_dir.h"
17 #include "base/sys_string_conversions.h" 17 #include "base/sys_string_conversions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "webkit/fileapi/file_system_context.h" 21 #include "webkit/fileapi/file_system_context.h"
22 #include "webkit/fileapi/file_system_task_runners.h" 22 #include "webkit/fileapi/file_system_task_runners.h"
23 #include "webkit/fileapi/file_system_util.h" 23 #include "webkit/fileapi/file_system_util.h"
24 #include "webkit/fileapi/mock_file_system_options.h" 24 #include "webkit/fileapi/mock_file_system_options.h"
25 #include "webkit/fileapi/sandbox_mount_point_provider.h" 25 #include "webkit/fileapi/sandbox_mount_point_provider.h"
26 #include "webkit/quota/mock_special_storage_policy.h" 26 #include "webkit/quota/mock_special_storage_policy.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 FilePath data_path() const { return data_dir_.path(); } 246 FilePath data_path() const { return data_dir_.path(); }
247 FilePath file_system_path() const { 247 FilePath file_system_path() const {
248 return data_dir_.path().Append( 248 return data_dir_.path().Append(
249 SandboxMountPointProvider::kNewFileSystemDirectory); 249 SandboxMountPointProvider::kNewFileSystemDirectory);
250 } 250 }
251 FileSystemContext* file_system_context() const { 251 FileSystemContext* file_system_context() const {
252 return file_system_context_.get(); 252 return file_system_context_.get();
253 } 253 }
254 254
255 private: 255 private:
256 ScopedTempDir data_dir_; 256 base::ScopedTempDir data_dir_;
257 MessageLoop message_loop_; 257 MessageLoop message_loop_;
258 base::WeakPtrFactory<FileSystemMountPointProviderTest> weak_factory_; 258 base::WeakPtrFactory<FileSystemMountPointProviderTest> weak_factory_;
259 259
260 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 260 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
261 scoped_refptr<FileSystemContext> file_system_context_; 261 scoped_refptr<FileSystemContext> file_system_context_;
262 262
263 DISALLOW_COPY_AND_ASSIGN(FileSystemMountPointProviderTest); 263 DISALLOW_COPY_AND_ASSIGN(FileSystemMountPointProviderTest);
264 }; 264 };
265 265
266 TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) { 266 TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 FilePath virtual_unused; 405 FilePath virtual_unused;
406 EXPECT_TRUE(external_provider->GetVirtualPath(FilePath(kMountPoint), 406 EXPECT_TRUE(external_provider->GetVirtualPath(FilePath(kMountPoint),
407 &virtual_unused)); 407 &virtual_unused));
408 external_provider->RemoveMountPoint(FilePath(kMountPoint)); 408 external_provider->RemoveMountPoint(FilePath(kMountPoint));
409 EXPECT_FALSE(external_provider->GetVirtualPath(FilePath(kMountPoint), 409 EXPECT_FALSE(external_provider->GetVirtualPath(FilePath(kMountPoint),
410 &virtual_unused)); 410 &virtual_unused));
411 } 411 }
412 #endif 412 #endif
413 413
414 } // namespace fileapi 414 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util_unittest.cc ('k') | webkit/fileapi/file_system_origin_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698