| OLD | NEW |
| 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 "chrome/browser/chromeos/gdata/drive_cache_metadata.h" | 5 #include "chrome/browser/chromeos/gdata/drive_cache_metadata.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
| 9 #include "chrome/browser/chromeos/gdata/drive.pb.h" | |
| 10 #include "chrome/browser/chromeos/gdata/drive_file_system_util.h" | 9 #include "chrome/browser/chromeos/gdata/drive_file_system_util.h" |
| 11 #include "chrome/browser/chromeos/gdata/drive_test_util.h" | 10 #include "chrome/browser/chromeos/gdata/drive_test_util.h" |
| 11 #include "chrome/browser/google_apis/drive.pb.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace gdata { | 14 namespace gdata { |
| 15 | 15 |
| 16 class DriveCacheMetadataTest : public testing::Test { | 16 class DriveCacheMetadataTest : public testing::Test { |
| 17 public: | 17 public: |
| 18 DriveCacheMetadataTest() {} | 18 DriveCacheMetadataTest() {} |
| 19 | 19 |
| 20 virtual void SetUp() OVERRIDE { | 20 virtual void SetUp() OVERRIDE { |
| 21 // Create cache directories. | 21 // Create cache directories. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 metadata_->RemoveTemporaryFiles(); | 382 metadata_->RemoveTemporaryFiles(); |
| 383 // resource 1 and 4 should be gone, as these are temporary. | 383 // resource 1 and 4 should be gone, as these are temporary. |
| 384 DriveCacheEntry cache_entry; | 384 DriveCacheEntry cache_entry; |
| 385 EXPECT_FALSE(metadata_->GetCacheEntry("<resource_id_1>", "", &cache_entry)); | 385 EXPECT_FALSE(metadata_->GetCacheEntry("<resource_id_1>", "", &cache_entry)); |
| 386 EXPECT_TRUE(metadata_->GetCacheEntry("<resource_id_2>", "", &cache_entry)); | 386 EXPECT_TRUE(metadata_->GetCacheEntry("<resource_id_2>", "", &cache_entry)); |
| 387 EXPECT_TRUE(metadata_->GetCacheEntry("<resource_id_3>", "", &cache_entry)); | 387 EXPECT_TRUE(metadata_->GetCacheEntry("<resource_id_3>", "", &cache_entry)); |
| 388 EXPECT_FALSE(metadata_->GetCacheEntry("<resource_id_4>", "", &cache_entry)); | 388 EXPECT_FALSE(metadata_->GetCacheEntry("<resource_id_4>", "", &cache_entry)); |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace gdata | 391 } // namespace gdata |
| OLD | NEW |