OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi
le_util.h" | 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi
le_util.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 void SetUp() override { | 119 void SetUp() override { |
120 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 120 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
121 profile_manager_.reset( | 121 profile_manager_.reset( |
122 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 122 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
123 ASSERT_TRUE(profile_manager_->SetUp()); | 123 ASSERT_TRUE(profile_manager_->SetUp()); |
124 profile_ = profile_manager_->CreateTestingProfile("testing-profile"); | 124 profile_ = profile_manager_->CreateTestingProfile("testing-profile"); |
125 async_file_util_.reset(new internal::ProviderAsyncFileUtil); | 125 async_file_util_.reset(new internal::ProviderAsyncFileUtil); |
126 | 126 |
127 file_system_context_ = | 127 file_system_context_ = |
128 content::CreateFileSystemContextForTesting(NULL, data_dir_.path()); | 128 content::CreateFileSystemContextForTesting(NULL, data_dir_.GetPath()); |
129 | 129 |
130 Service* service = Service::Get(profile_); // Owned by its factory. | 130 Service* service = Service::Get(profile_); // Owned by its factory. |
131 service->SetFileSystemFactoryForTesting( | 131 service->SetFileSystemFactoryForTesting( |
132 base::Bind(&FakeProvidedFileSystem::Create)); | 132 base::Bind(&FakeProvidedFileSystem::Create)); |
133 | 133 |
134 const base::File::Error result = service->MountFileSystem( | 134 const base::File::Error result = service->MountFileSystem( |
135 kExtensionId, MountOptions(kFileSystemId, "Testing File System")); | 135 kExtensionId, MountOptions(kFileSystemId, "Testing File System")); |
136 ASSERT_EQ(base::File::FILE_OK, result); | 136 ASSERT_EQ(base::File::FILE_OK, result); |
137 const ProvidedFileSystemInfo& file_system_info = | 137 const ProvidedFileSystemInfo& file_system_info = |
138 service->GetProvidedFileSystem(kExtensionId, kFileSystemId) | 138 service->GetProvidedFileSystem(kExtensionId, kFileSystemId) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 file_url_, | 409 file_url_, |
410 base::Bind(&EventLogger::OnCreateSnapshotFile, | 410 base::Bind(&EventLogger::OnCreateSnapshotFile, |
411 base::Unretained(&logger))); | 411 base::Unretained(&logger))); |
412 | 412 |
413 ASSERT_TRUE(logger.result()); | 413 ASSERT_TRUE(logger.result()); |
414 EXPECT_EQ(base::File::FILE_ERROR_INVALID_OPERATION, *logger.result()); | 414 EXPECT_EQ(base::File::FILE_ERROR_INVALID_OPERATION, *logger.result()); |
415 } | 415 } |
416 | 416 |
417 } // namespace file_system_provider | 417 } // namespace file_system_provider |
418 } // namespace chromeos | 418 } // namespace chromeos |
OLD | NEW |