OLD | NEW |
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 <map> | 5 #include <map> |
6 #include <queue> | 6 #include <queue> |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return file_system_context->CreateCrackedFileSystemURL( | 82 return file_system_context->CreateCrackedFileSystemURL( |
83 other_root.origin(), | 83 other_root.origin(), |
84 other_root.mount_type(), | 84 other_root.mount_type(), |
85 other_root.virtual_path().Append(GetRelativeVirtualPath(root, url))); | 85 other_root.virtual_path().Append(GetRelativeVirtualPath(root, url))); |
86 } | 86 } |
87 | 87 |
88 } // namespace | 88 } // namespace |
89 | 89 |
90 class DraggedFileUtilTest : public testing::Test { | 90 class DraggedFileUtilTest : public testing::Test { |
91 public: | 91 public: |
92 DraggedFileUtilTest() {} | 92 DraggedFileUtilTest() |
| 93 : message_loop_(base::MessageLoop::TYPE_IO) {} |
93 | 94 |
94 virtual void SetUp() { | 95 virtual void SetUp() { |
95 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 96 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
96 ASSERT_TRUE(partition_dir_.CreateUniqueTempDir()); | 97 ASSERT_TRUE(partition_dir_.CreateUniqueTempDir()); |
97 file_util_.reset(new DraggedFileUtil()); | 98 file_util_.reset(new DraggedFileUtil()); |
98 | 99 |
99 // Register the files/directories of RegularTestCases (with random | 100 // Register the files/directories of RegularTestCases (with random |
100 // root paths) as dropped files. | 101 // root paths) as dropped files. |
101 SimulateDropFiles(); | 102 SimulateDropFiles(); |
102 | 103 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 EXPECT_EQ(base::PLATFORM_FILE_OK, | 537 EXPECT_EQ(base::PLATFORM_FILE_OK, |
537 file_util()->Truncate(GetOperationContext().get(), url, 999)); | 538 file_util()->Truncate(GetOperationContext().get(), url, 999)); |
538 ASSERT_EQ(base::PLATFORM_FILE_OK, | 539 ASSERT_EQ(base::PLATFORM_FILE_OK, |
539 file_util()->GetFileInfo(GetOperationContext().get(), url, | 540 file_util()->GetFileInfo(GetOperationContext().get(), url, |
540 &info, &platform_path)); | 541 &info, &platform_path)); |
541 EXPECT_EQ(999, info.size); | 542 EXPECT_EQ(999, info.size); |
542 } | 543 } |
543 } | 544 } |
544 | 545 |
545 } // namespace fileapi | 546 } // namespace fileapi |
OLD | NEW |