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

Side by Side Diff: content/browser/fileapi/local_file_util_unittest.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "content/public/test/async_file_test_helper.h" 15 #include "content/public/test/async_file_test_helper.h"
16 #include "content/public/test/test_file_system_context.h" 16 #include "content/public/test/test_file_system_context.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "webkit/browser/fileapi/async_file_util_adapter.h" 18 #include "storage/browser/fileapi/async_file_util_adapter.h"
19 #include "webkit/browser/fileapi/file_system_context.h" 19 #include "storage/browser/fileapi/file_system_context.h"
20 #include "webkit/browser/fileapi/file_system_file_util.h" 20 #include "storage/browser/fileapi/file_system_file_util.h"
21 #include "webkit/browser/fileapi/file_system_operation_context.h" 21 #include "storage/browser/fileapi/file_system_operation_context.h"
22 #include "webkit/browser/fileapi/local_file_util.h" 22 #include "storage/browser/fileapi/local_file_util.h"
23 #include "webkit/browser/fileapi/native_file_util.h" 23 #include "storage/browser/fileapi/native_file_util.h"
24 #include "webkit/common/fileapi/file_system_types.h" 24 #include "storage/common/fileapi/file_system_types.h"
25 25
26 using content::AsyncFileTestHelper; 26 using content::AsyncFileTestHelper;
27 using fileapi::AsyncFileUtilAdapter; 27 using storage::AsyncFileUtilAdapter;
28 using fileapi::FileSystemContext; 28 using storage::FileSystemContext;
29 using fileapi::FileSystemOperationContext; 29 using storage::FileSystemOperationContext;
30 using fileapi::FileSystemURL; 30 using storage::FileSystemURL;
31 using fileapi::LocalFileUtil; 31 using storage::LocalFileUtil;
32 32
33 namespace content { 33 namespace content {
34 34
35 namespace { 35 namespace {
36 36
37 const GURL kOrigin("http://foo/"); 37 const GURL kOrigin("http://foo/");
38 const fileapi::FileSystemType kFileSystemType = fileapi::kFileSystemTypeTest; 38 const storage::FileSystemType kFileSystemType = storage::kFileSystemTypeTest;
39 39
40 } // namespace 40 } // namespace
41 41
42 class LocalFileUtilTest : public testing::Test { 42 class LocalFileUtilTest : public testing::Test {
43 public: 43 public:
44 LocalFileUtilTest() {} 44 LocalFileUtilTest() {}
45 45
46 virtual void SetUp() { 46 virtual void SetUp() {
47 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 47 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
48 file_system_context_ = CreateFileSystemContextForTesting( 48 file_system_context_ = CreateFileSystemContextForTesting(
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 CreateURL(from_dir), 368 CreateURL(from_dir),
369 CreateURL(to_dir))); 369 CreateURL(to_dir)));
370 370
371 EXPECT_FALSE(DirectoryExists(from_dir)); 371 EXPECT_FALSE(DirectoryExists(from_dir));
372 EXPECT_TRUE(DirectoryExists(to_dir)); 372 EXPECT_TRUE(DirectoryExists(to_dir));
373 EXPECT_TRUE(FileExists(to_file)); 373 EXPECT_TRUE(FileExists(to_file));
374 EXPECT_EQ(1020, GetSize(to_file)); 374 EXPECT_EQ(1020, GetSize(to_file));
375 } 375 }
376 376
377 } // namespace content 377 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/local_file_stream_writer_unittest.cc ('k') | content/browser/fileapi/mock_file_change_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698