| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/fileapi/file_system_operation.h" | 5 #include "webkit/fileapi/file_system_operation.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 }; | 295 }; |
| 296 | 296 |
| 297 } // namespace (anonymous) | 297 } // namespace (anonymous) |
| 298 | 298 |
| 299 void FileSystemOperationTest::SetUp() { | 299 void FileSystemOperationTest::SetUp() { |
| 300 FilePath base_dir = base_.path().AppendASCII("filesystem"); | 300 FilePath base_dir = base_.path().AppendASCII("filesystem"); |
| 301 quota_manager_ = new MockQuotaManager( | 301 quota_manager_ = new MockQuotaManager( |
| 302 base_dir, test_helper_.origin(), test_helper_.storage_type()); | 302 base_dir, test_helper_.origin(), test_helper_.storage_type()); |
| 303 quota_manager_proxy_ = new MockQuotaManagerProxy(quota_manager_.get()); | 303 quota_manager_proxy_ = new MockQuotaManagerProxy(quota_manager_.get()); |
| 304 test_helper_.SetUp(base_dir, | 304 test_helper_.SetUp(base_dir, |
| 305 false /* incognito */, | |
| 306 false /* unlimited quota */, | 305 false /* unlimited quota */, |
| 307 quota_manager_proxy_.get(), | 306 quota_manager_proxy_.get(), |
| 308 local_file_util_.get()); | 307 local_file_util_.get()); |
| 309 } | 308 } |
| 310 | 309 |
| 311 void FileSystemOperationTest::TearDown() { | 310 void FileSystemOperationTest::TearDown() { |
| 312 // Let the client go away before dropping a ref of the quota manager proxy. | 311 // Let the client go away before dropping a ref of the quota manager proxy. |
| 313 quota_manager_proxy()->SimulateQuotaManagerDestroyed(); | 312 quota_manager_proxy()->SimulateQuotaManagerDestroyed(); |
| 314 quota_manager_ = NULL; | 313 quota_manager_ = NULL; |
| 315 quota_manager_proxy_ = NULL; | 314 quota_manager_proxy_ = NULL; |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 | 978 |
| 980 EXPECT_TRUE(file_util::GetFileInfo(platform_path, &info)); | 979 EXPECT_TRUE(file_util::GetFileInfo(platform_path, &info)); |
| 981 // We compare as time_t here to lower our resolution, to avoid false | 980 // We compare as time_t here to lower our resolution, to avoid false |
| 982 // negatives caused by conversion to the local filesystem's native | 981 // negatives caused by conversion to the local filesystem's native |
| 983 // representation and back. | 982 // representation and back. |
| 984 EXPECT_EQ(new_modified_time.ToTimeT(), info.last_modified.ToTimeT()); | 983 EXPECT_EQ(new_modified_time.ToTimeT(), info.last_modified.ToTimeT()); |
| 985 EXPECT_EQ(new_accessed_time.ToTimeT(), info.last_accessed.ToTimeT()); | 984 EXPECT_EQ(new_accessed_time.ToTimeT(), info.last_accessed.ToTimeT()); |
| 986 } | 985 } |
| 987 | 986 |
| 988 } // namespace fileapi | 987 } // namespace fileapi |
| OLD | NEW |