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

Side by Side Diff: webkit/browser/fileapi/transient_file_util_unittest.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 CreateAndRegisterTemporaryFile(&temp_url, &temp_path); 80 CreateAndRegisterTemporaryFile(&temp_url, &temp_path);
81 81
82 base::PlatformFileError error; 82 base::PlatformFileError error;
83 base::PlatformFileInfo file_info; 83 base::PlatformFileInfo file_info;
84 base::FilePath path; 84 base::FilePath path;
85 85
86 // Make sure the file is there. 86 // Make sure the file is there.
87 ASSERT_TRUE(temp_url.is_valid()); 87 ASSERT_TRUE(temp_url.is_valid());
88 ASSERT_TRUE(base::PathExists(temp_path)); 88 ASSERT_TRUE(base::PathExists(temp_path));
89 ASSERT_FALSE(file_util::DirectoryExists(temp_path)); 89 ASSERT_FALSE(base::DirectoryExists(temp_path));
90 90
91 // Create a snapshot file. 91 // Create a snapshot file.
92 { 92 {
93 webkit_blob::ScopedFile scoped_file = 93 webkit_blob::ScopedFile scoped_file =
94 file_util()->CreateSnapshotFile(NewOperationContext().get(), 94 file_util()->CreateSnapshotFile(NewOperationContext().get(),
95 temp_url, 95 temp_url,
96 &error, 96 &error,
97 &file_info, 97 &file_info,
98 &path); 98 &path);
99 ASSERT_EQ(base::PLATFORM_FILE_OK, error); 99 ASSERT_EQ(base::PLATFORM_FILE_OK, error);
(...skipping 13 matching lines...) Expand all
113 base::MessageLoop::current()->RunUntilIdle(); 113 base::MessageLoop::current()->RunUntilIdle();
114 114
115 // Now the temporary file and the transient filesystem must be gone too. 115 // Now the temporary file and the transient filesystem must be gone too.
116 ASSERT_FALSE(base::PathExists(temp_path)); 116 ASSERT_FALSE(base::PathExists(temp_path));
117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, 117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND,
118 file_util()->GetFileInfo(NewOperationContext().get(), 118 file_util()->GetFileInfo(NewOperationContext().get(),
119 temp_url, &file_info, &path)); 119 temp_url, &file_info, &path));
120 } 120 }
121 121
122 } // namespace fileapi 122 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_isolated_origin_database_unittest.cc ('k') | webkit/glue/webfileutilities_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698