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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 } // namespace | 138 } // namespace |
139 | 139 |
140 // TODO(ericu): The vast majority of this and the other FSFU subclass tests | 140 // TODO(ericu): The vast majority of this and the other FSFU subclass tests |
141 // could theoretically be shared. It would basically be a FSFU interface | 141 // could theoretically be shared. It would basically be a FSFU interface |
142 // compliance test, and only the subclass-specific bits that look into the | 142 // compliance test, and only the subclass-specific bits that look into the |
143 // implementation would need to be written per-subclass. | 143 // implementation would need to be written per-subclass. |
144 class ObfuscatedFileUtilTest : public testing::Test { | 144 class ObfuscatedFileUtilTest : public testing::Test { |
145 public: | 145 public: |
146 ObfuscatedFileUtilTest() | 146 ObfuscatedFileUtilTest() |
147 : origin_(GURL("http://www.example.com")), | 147 : message_loop_(base::MessageLoop::TYPE_IO), |
| 148 origin_(GURL("http://www.example.com")), |
148 type_(storage::kFileSystemTypeTemporary), | 149 type_(storage::kFileSystemTypeTemporary), |
149 weak_factory_(this), | 150 weak_factory_(this), |
150 sandbox_file_system_(origin_, type_), | 151 sandbox_file_system_(origin_, type_), |
151 quota_status_(storage::kQuotaStatusUnknown), | 152 quota_status_(storage::kQuotaStatusUnknown), |
152 usage_(-1) {} | 153 usage_(-1) {} |
153 | 154 |
154 virtual void SetUp() { | 155 virtual void SetUp() { |
155 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 156 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
156 | 157 |
157 storage_policy_ = new MockSpecialStoragePolicy(); | 158 storage_policy_ = new MockSpecialStoragePolicy(); |
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2444 false /* exclusive */, | 2445 false /* exclusive */, |
2445 true /* recursive */)); | 2446 true /* recursive */)); |
2446 ASSERT_EQ(base::File::FILE_ERROR_NOT_A_DIRECTORY, | 2447 ASSERT_EQ(base::File::FILE_ERROR_NOT_A_DIRECTORY, |
2447 ofu()->CreateDirectory(UnlimitedContext().get(), | 2448 ofu()->CreateDirectory(UnlimitedContext().get(), |
2448 path_in_file_in_file, | 2449 path_in_file_in_file, |
2449 false /* exclusive */, | 2450 false /* exclusive */, |
2450 true /* recursive */)); | 2451 true /* recursive */)); |
2451 } | 2452 } |
2452 | 2453 |
2453 } // namespace content | 2454 } // namespace content |
OLD | NEW |