| 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return IsolatedContext::GetInstance()->RegisterFileSystemForVirtualPath( | 43 return IsolatedContext::GetInstance()->RegisterFileSystemForVirtualPath( |
| 44 kType, kRootName, base::FilePath()); | 44 kType, kRootName, base::FilePath()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace | 47 } // namespace |
| 48 | 48 |
| 49 class PluginPrivateFileSystemBackendTest : public testing::Test { | 49 class PluginPrivateFileSystemBackendTest : public testing::Test { |
| 50 protected: | 50 protected: |
| 51 void SetUp() override { | 51 void SetUp() override { |
| 52 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 52 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 53 context_ = CreateFileSystemContextForTesting( | 53 context_ = CreateFileSystemContextForTesting(NULL /* quota_manager_proxy */, |
| 54 NULL /* quota_manager_proxy */, | 54 data_dir_.GetPath()); |
| 55 data_dir_.path()); | |
| 56 } | 55 } |
| 57 | 56 |
| 58 FileSystemURL CreateURL(const GURL& root_url, const std::string& relative) { | 57 FileSystemURL CreateURL(const GURL& root_url, const std::string& relative) { |
| 59 FileSystemURL root = context_->CrackURL(root_url); | 58 FileSystemURL root = context_->CrackURL(root_url); |
| 60 return context_->CreateCrackedFileSystemURL( | 59 return context_->CreateCrackedFileSystemURL( |
| 61 root.origin(), | 60 root.origin(), |
| 62 root.mount_type(), | 61 root.mount_type(), |
| 63 root.virtual_path().AppendASCII(relative)); | 62 root.virtual_path().AppendASCII(relative)); |
| 64 } | 63 } |
| 65 | 64 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 AsyncFileTestHelper::CreateFile(context_.get(), file3)); | 279 AsyncFileTestHelper::CreateFile(context_.get(), file3)); |
| 281 EXPECT_TRUE(AsyncFileTestHelper::FileExists( | 280 EXPECT_TRUE(AsyncFileTestHelper::FileExists( |
| 282 context_.get(), file3, AsyncFileTestHelper::kDontCheckSize)); | 281 context_.get(), file3, AsyncFileTestHelper::kDontCheckSize)); |
| 283 | 282 |
| 284 // Confirm 'foo' in kOrigin1 is re-created. | 283 // Confirm 'foo' in kOrigin1 is re-created. |
| 285 EXPECT_TRUE(AsyncFileTestHelper::FileExists( | 284 EXPECT_TRUE(AsyncFileTestHelper::FileExists( |
| 286 context_.get(), file3, AsyncFileTestHelper::kDontCheckSize)); | 285 context_.get(), file3, AsyncFileTestHelper::kDontCheckSize)); |
| 287 } | 286 } |
| 288 | 287 |
| 289 } // namespace content | 288 } // namespace content |
| OLD | NEW |