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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 std::string RegisterFileSystem() { | 42 std::string RegisterFileSystem() { |
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 virtual void SetUp() OVERRIDE { | 51 virtual void SetUp() override { |
52 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 52 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
53 context_ = CreateFileSystemContextForTesting( | 53 context_ = CreateFileSystemContextForTesting( |
54 NULL /* quota_manager_proxy */, | 54 NULL /* quota_manager_proxy */, |
55 data_dir_.path()); | 55 data_dir_.path()); |
56 } | 56 } |
57 | 57 |
58 FileSystemURL CreateURL(const GURL& root_url, const std::string& relative) { | 58 FileSystemURL CreateURL(const GURL& root_url, const std::string& relative) { |
59 FileSystemURL root = context_->CrackURL(root_url); | 59 FileSystemURL root = context_->CrackURL(root_url); |
60 return context_->CreateCrackedFileSystemURL( | 60 return context_->CreateCrackedFileSystemURL( |
61 root.origin(), | 61 root.origin(), |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 kOrigin, filesystem_id2, kRootName)); | 155 kOrigin, filesystem_id2, kRootName)); |
156 FileSystemURL file2 = CreateURL(root_url2, "foo"); | 156 FileSystemURL file2 = CreateURL(root_url2, "foo"); |
157 EXPECT_FALSE(AsyncFileTestHelper::FileExists( | 157 EXPECT_FALSE(AsyncFileTestHelper::FileExists( |
158 context_.get(), file2, AsyncFileTestHelper::kDontCheckSize)); | 158 context_.get(), file2, AsyncFileTestHelper::kDontCheckSize)); |
159 } | 159 } |
160 | 160 |
161 // TODO(kinuko,nhiroki): also test if DeleteOriginDataOnFileThread | 161 // TODO(kinuko,nhiroki): also test if DeleteOriginDataOnFileThread |
162 // works fine when there's multiple plugin partitions. | 162 // works fine when there's multiple plugin partitions. |
163 | 163 |
164 } // namespace content | 164 } // namespace content |
OLD | NEW |