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

Side by Side Diff: webkit/fileapi/file_system_file_util_unittest.cc

Issue 10447043: Move all webkit/fileapi tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h"
8 #include "base/platform_file.h" 9 #include "base/platform_file.h"
9 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/fileapi/file_system_context.h" 12 #include "webkit/fileapi/file_system_context.h"
12 #include "webkit/fileapi/file_system_operation_context.h" 13 #include "webkit/fileapi/file_system_operation_context.h"
13 #include "webkit/fileapi/file_system_test_helper.h" 14 #include "webkit/fileapi/file_system_test_helper.h"
14 #include "webkit/fileapi/file_util_helper.h" 15 #include "webkit/fileapi/file_util_helper.h"
15 #include "webkit/fileapi/native_file_util.h" 16 #include "webkit/fileapi/native_file_util.h"
16 #include "webkit/fileapi/obfuscated_file_util.h" 17 #include "webkit/fileapi/obfuscated_file_util.h"
17 #include "webkit/fileapi/test_file_set.h" 18 #include "webkit/fileapi/test_file_set.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 expected_result = base::PLATFORM_FILE_OK; 143 expected_result = base::PLATFORM_FILE_OK;
143 else 144 else
144 expected_result = base::PLATFORM_FILE_ERROR_NOT_FOUND; 145 expected_result = base::PLATFORM_FILE_ERROR_NOT_FOUND;
145 EXPECT_EQ(expected_result, 146 EXPECT_EQ(expected_result,
146 file_util->GetFileInfo( 147 file_util->GetFileInfo(
147 context.get(), path, &src_file_info, &data_path)); 148 context.get(), path, &src_file_info, &data_path));
148 } 149 }
149 } 150 }
150 151
151 private: 152 private:
153 MessageLoop message_loop_;
152 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtilTest); 154 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtilTest);
153 }; 155 };
154 156
155 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemCopyDifferentOrigins) { 157 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemCopyDifferentOrigins) {
156 GURL src_origin("http://www.example.com"); 158 GURL src_origin("http://www.example.com");
157 fileapi::FileSystemType type = kFileSystemTypePersistent; 159 fileapi::FileSystemType type = kFileSystemTypePersistent;
158 GURL dest_origin("http://www.not.the.same.domain.com"); 160 GURL dest_origin("http://www.not.the.same.domain.com");
159 161
160 TestCrossFileSystemCopyMoveHelper(src_origin, type, dest_origin, type, true); 162 TestCrossFileSystemCopyMoveHelper(src_origin, type, dest_origin, type, true);
161 } 163 }
(...skipping 16 matching lines...) Expand all
178 180
179 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemMoveSameOrigin) { 181 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemMoveSameOrigin) {
180 GURL origin("http://www.example.com"); 182 GURL origin("http://www.example.com");
181 fileapi::FileSystemType src_type = kFileSystemTypePersistent; 183 fileapi::FileSystemType src_type = kFileSystemTypePersistent;
182 fileapi::FileSystemType dest_type = kFileSystemTypeTemporary; 184 fileapi::FileSystemType dest_type = kFileSystemTypeTemporary;
183 185
184 TestCrossFileSystemCopyMoveHelper(origin, src_type, origin, dest_type, false); 186 TestCrossFileSystemCopyMoveHelper(origin, src_type, origin, dest_type, false);
185 } 187 }
186 188
187 } // namespace fileapi 189 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698