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 "storage/browser/fileapi/file_system_context.h" | 5 #include "storage/browser/fileapi/file_system_context.h" |
6 | 6 |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "content/browser/quota/mock_quota_manager.h" | 10 #include "content/browser/quota/mock_quota_manager.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 "filesystem:http://chromium.org/%s/%s/root/file", | 42 "filesystem:http://chromium.org/%s/%s/root/file", |
43 type_str.c_str(), | 43 type_str.c_str(), |
44 fs_id.c_str()); | 44 fs_id.c_str()); |
45 return GURL(url_str); | 45 return GURL(url_str); |
46 } | 46 } |
47 | 47 |
48 class FileSystemContextTest : public testing::Test { | 48 class FileSystemContextTest : public testing::Test { |
49 public: | 49 public: |
50 FileSystemContextTest() {} | 50 FileSystemContextTest() {} |
51 | 51 |
52 virtual void SetUp() { | 52 void SetUp() override { |
53 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 53 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
54 | 54 |
55 storage_policy_ = new MockSpecialStoragePolicy(); | 55 storage_policy_ = new MockSpecialStoragePolicy(); |
56 | 56 |
57 mock_quota_manager_ = | 57 mock_quota_manager_ = |
58 new MockQuotaManager(false /* is_incognito */, | 58 new MockQuotaManager(false /* is_incognito */, |
59 data_dir_.path(), | 59 data_dir_.path(), |
60 base::MessageLoopProxy::current().get(), | 60 base::MessageLoopProxy::current().get(), |
61 base::MessageLoopProxy::current().get(), | 61 base::MessageLoopProxy::current().get(), |
62 storage_policy_.get()); | 62 storage_policy_.get()); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); | 362 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); |
363 | 363 |
364 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( | 364 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
365 kExternalMountName); | 365 kExternalMountName); |
366 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); | 366 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); |
367 } | 367 } |
368 | 368 |
369 } // namespace | 369 } // namespace |
370 | 370 |
371 } // namespace content | 371 } // namespace content |
OLD | NEW |