| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "chrome/browser/chromeos/drive/drive.pb.h" | 12 #include "chrome/browser/chromeos/drive/drive.pb.h" |
| 13 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" | 13 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" |
| 14 #include "chrome/browser/chromeos/drive/file_system_util.h" | 14 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 15 #include "chrome/browser/chromeos/drive/remove_stale_cache_files.h" | 15 #include "chrome/browser/chromeos/drive/remove_stale_cache_files.h" |
| 16 #include "chrome/browser/chromeos/drive/resource_metadata.h" | 16 #include "chrome/browser/chromeos/drive/resource_metadata.h" |
| 17 #include "chrome/browser/chromeos/drive/test_util.h" | 17 #include "chrome/browser/chromeos/drive/test_util.h" |
| 18 #include "chrome/browser/google_apis/test_util.h" | |
| 19 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
| 19 #include "google_apis/drive/test_util.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 namespace drive { | 22 namespace drive { |
| 23 namespace internal { | 23 namespace internal { |
| 24 | 24 |
| 25 class RemoveStaleCacheFilesTest : public testing::Test { | 25 class RemoveStaleCacheFilesTest : public testing::Test { |
| 26 protected: | 26 protected: |
| 27 virtual void SetUp() OVERRIDE { | 27 virtual void SetUp() OVERRIDE { |
| 28 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 28 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 29 | 29 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 // Dirty cache should be removed if and only if the entry does not exist in | 119 // Dirty cache should be removed if and only if the entry does not exist in |
| 120 // resource_metadata. | 120 // resource_metadata. |
| 121 FileCacheEntry cache_entry; | 121 FileCacheEntry cache_entry; |
| 122 EXPECT_FALSE(cache_->GetCacheEntry(local_id_1, &cache_entry)); | 122 EXPECT_FALSE(cache_->GetCacheEntry(local_id_1, &cache_entry)); |
| 123 EXPECT_TRUE(cache_->GetCacheEntry(local_id_2, &cache_entry)); | 123 EXPECT_TRUE(cache_->GetCacheEntry(local_id_2, &cache_entry)); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace internal | 126 } // namespace internal |
| 127 } // namespace drive | 127 } // namespace drive |
| OLD | NEW |