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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/create_directory_operation_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, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/drive/file_system/create_directory_operation.h " 5 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h "
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chromeos/drive/file_system_util.h" 9 #include "chrome/browser/chromeos/drive/file_system_util.h"
10 #include "chrome/browser/chromeos/drive/resource_metadata.h" 10 #include "chrome/browser/chromeos/drive/resource_metadata.h"
(...skipping 20 matching lines...) Expand all
31 31
32 PlatformFileInfoProto* file_info = entry.mutable_file_info(); 32 PlatformFileInfoProto* file_info = entry.mutable_file_info();
33 file_info->set_is_directory(is_directory); 33 file_info->set_is_directory(is_directory);
34 34
35 return entry; 35 return entry;
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 TEST(CreateDirectoryOperationTest, GetExistingDeepestDirectory) { 40 TEST(CreateDirectoryOperationTest, GetExistingDeepestDirectory) {
41 MessageLoopForUI message_loop; 41 base::MessageLoopForUI message_loop;
42 content::TestBrowserThread ui_thread( 42 content::TestBrowserThread ui_thread(
43 content::BrowserThread::UI, &message_loop); 43 content::BrowserThread::UI, &message_loop);
44 44
45 // Set up a Metadata instance. 45 // Set up a Metadata instance.
46 base::ScopedTempDir temp_dir; 46 base::ScopedTempDir temp_dir;
47 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 47 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
48 scoped_ptr<internal::ResourceMetadata, test_util::DestroyHelperForTests> 48 scoped_ptr<internal::ResourceMetadata, test_util::DestroyHelperForTests>
49 metadata(new internal::ResourceMetadata( 49 metadata(new internal::ResourceMetadata(
50 temp_dir.path(), message_loop.message_loop_proxy())); 50 temp_dir.path(), message_loop.message_loop_proxy()));
51 FileError error = FILE_ERROR_FAILED; 51 FileError error = FILE_ERROR_FAILED;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 EXPECT_EQ( 166 EXPECT_EQ(
167 FILE_PATH_LITERAL(""), 167 FILE_PATH_LITERAL(""),
168 CreateDirectoryOperation::GetExistingDeepestDirectory( 168 CreateDirectoryOperation::GetExistingDeepestDirectory(
169 metadata.get(), 169 metadata.get(),
170 base::FilePath(FILE_PATH_LITERAL("foo/bar")), 170 base::FilePath(FILE_PATH_LITERAL("foo/bar")),
171 &entry).value()); 171 &entry).value());
172 } 172 }
173 173
174 } // namespace file_system 174 } // namespace file_system
175 } // namespace drive 175 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698