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

Side by Side Diff: chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 cache_->RequestInitializeForTesting(); 47 cache_->RequestInitializeForTesting();
48 message_loop_.RunUntilIdle(); 48 message_loop_.RunUntilIdle();
49 49
50 FileError error = FILE_ERROR_FAILED; 50 FileError error = FILE_ERROR_FAILED;
51 resource_metadata_->Initialize( 51 resource_metadata_->Initialize(
52 google_apis::test_util::CreateCopyResultCallback(&error)); 52 google_apis::test_util::CreateCopyResultCallback(&error));
53 message_loop_.RunUntilIdle(); 53 message_loop_.RunUntilIdle();
54 ASSERT_EQ(FILE_ERROR_OK, error); 54 ASSERT_EQ(FILE_ERROR_OK, error);
55 } 55 }
56 56
57 MessageLoopForUI message_loop_; 57 base::MessageLoopForUI message_loop_;
58 content::TestBrowserThread ui_thread_; 58 content::TestBrowserThread ui_thread_;
59 base::ScopedTempDir temp_dir_; 59 base::ScopedTempDir temp_dir_;
60 60
61 scoped_ptr<FileCache, test_util::DestroyHelperForTests> cache_; 61 scoped_ptr<FileCache, test_util::DestroyHelperForTests> cache_;
62 scoped_ptr<ResourceMetadata, test_util::DestroyHelperForTests> 62 scoped_ptr<ResourceMetadata, test_util::DestroyHelperForTests>
63 resource_metadata_; 63 resource_metadata_;
64 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_; 64 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_;
65 }; 65 };
66 66
67 TEST_F(RemoveStaleCacheFilesTest, RemoveStaleCacheFiles) { 67 TEST_F(RemoveStaleCacheFilesTest, RemoveStaleCacheFiles) {
(...skipping 20 matching lines...) Expand all
88 88
89 // Remove stale cache files. 89 // Remove stale cache files.
90 RemoveStaleCacheFiles(cache_.get(), resource_metadata_.get()); 90 RemoveStaleCacheFiles(cache_.get(), resource_metadata_.get());
91 91
92 // Verify that the cache entry is deleted. 92 // Verify that the cache entry is deleted.
93 EXPECT_FALSE(cache_->GetCacheEntry(resource_id, md5, &cache_entry)); 93 EXPECT_FALSE(cache_->GetCacheEntry(resource_id, md5, &cache_entry));
94 } 94 }
95 95
96 } // namespace internal 96 } // namespace internal
97 } // namespace drive 97 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698