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

Side by Side Diff: webkit/fileapi/isolated_file_util_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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/scoped_temp_dir.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/message_loop.h" 13 #include "base/message_loop.h"
13 #include "base/message_loop_proxy.h" 14 #include "base/message_loop_proxy.h"
14 #include "base/scoped_temp_dir.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "webkit/fileapi/file_system_context.h" 17 #include "webkit/fileapi/file_system_context.h"
18 #include "webkit/fileapi/file_system_operation_context.h" 18 #include "webkit/fileapi/file_system_operation_context.h"
19 #include "webkit/fileapi/file_system_task_runners.h" 19 #include "webkit/fileapi/file_system_task_runners.h"
20 #include "webkit/fileapi/file_util_helper.h" 20 #include "webkit/fileapi/file_util_helper.h"
21 #include "webkit/fileapi/isolated_context.h" 21 #include "webkit/fileapi/isolated_context.h"
22 #include "webkit/fileapi/isolated_file_util.h" 22 #include "webkit/fileapi/isolated_file_util.h"
23 #include "webkit/fileapi/local_file_system_operation.h" 23 #include "webkit/fileapi/local_file_system_operation.h"
24 #include "webkit/fileapi/local_file_system_test_helper.h" 24 #include "webkit/fileapi/local_file_system_test_helper.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 toplevels.AddPath(root.Append(path), NULL); 227 toplevels.AddPath(root.Append(path), NULL);
228 } 228 }
229 229
230 test::SetUpOneTestCase(toplevel_root_map_[toplevel], test_case); 230 test::SetUpOneTestCase(toplevel_root_map_[toplevel], test_case);
231 } 231 }
232 232
233 // Register the toplevel entries. 233 // Register the toplevel entries.
234 filesystem_id_ = isolated_context()->RegisterDraggedFileSystem(toplevels); 234 filesystem_id_ = isolated_context()->RegisterDraggedFileSystem(toplevels);
235 } 235 }
236 236
237 ScopedTempDir data_dir_; 237 base::ScopedTempDir data_dir_;
238 MessageLoop message_loop_; 238 MessageLoop message_loop_;
239 std::string filesystem_id_; 239 std::string filesystem_id_;
240 scoped_refptr<FileSystemContext> file_system_context_; 240 scoped_refptr<FileSystemContext> file_system_context_;
241 std::map<FilePath, FilePath> toplevel_root_map_; 241 std::map<FilePath, FilePath> toplevel_root_map_;
242 scoped_ptr<IsolatedFileUtil> file_util_; 242 scoped_ptr<IsolatedFileUtil> file_util_;
243 scoped_ptr<LocalFileUtil> other_file_util_; 243 scoped_ptr<LocalFileUtil> other_file_util_;
244 LocalFileSystemTestOriginHelper other_file_util_helper_; 244 LocalFileSystemTestOriginHelper other_file_util_helper_;
245 DISALLOW_COPY_AND_ASSIGN(IsolatedFileUtilTest); 245 DISALLOW_COPY_AND_ASSIGN(IsolatedFileUtilTest);
246 }; 246 };
247 247
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 EXPECT_EQ(base::PLATFORM_FILE_OK, 507 EXPECT_EQ(base::PLATFORM_FILE_OK,
508 file_util()->Truncate(GetOperationContext().get(), url, 999)); 508 file_util()->Truncate(GetOperationContext().get(), url, 999));
509 ASSERT_EQ(base::PLATFORM_FILE_OK, 509 ASSERT_EQ(base::PLATFORM_FILE_OK,
510 file_util()->GetFileInfo(GetOperationContext().get(), url, 510 file_util()->GetFileInfo(GetOperationContext().get(), url,
511 &info, &platform_path)); 511 &info, &platform_path));
512 EXPECT_EQ(999, info.size); 512 EXPECT_EQ(999, info.size);
513 } 513 }
514 } 514 }
515 515
516 } // namespace fileapi 516 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_writer_delegate_unittest.cc ('k') | webkit/fileapi/local_file_stream_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698