| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/files/file.h" | 13 #include "base/files/file.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/run_loop.h" | 19 #include "base/run_loop.h" |
| 20 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system
.h" | 20 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system
.h" |
| 21 #include "chrome/browser/chromeos/file_system_provider/service.h" | 21 #include "chrome/browser/chromeos/file_system_provider/service.h" |
| 22 #include "chrome/browser/chromeos/file_system_provider/service_factory.h" | 22 #include "chrome/browser/chromeos/file_system_provider/service_factory.h" |
| 23 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
| 24 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
| 25 #include "chrome/test/base/testing_profile_manager.h" | 25 #include "chrome/test/base/testing_profile_manager.h" |
| 26 #include "content/public/test/test_browser_thread_bundle.h" | 26 #include "content/public/test/test_browser_thread_bundle.h" |
| 27 #include "content/public/test/test_file_system_context.h" | |
| 28 #include "extensions/browser/extension_registry.h" | 27 #include "extensions/browser/extension_registry.h" |
| 29 #include "storage/browser/blob/shareable_file_reference.h" | 28 #include "storage/browser/blob/shareable_file_reference.h" |
| 30 #include "storage/browser/fileapi/async_file_util.h" | 29 #include "storage/browser/fileapi/async_file_util.h" |
| 31 #include "storage/browser/fileapi/external_mount_points.h" | 30 #include "storage/browser/fileapi/external_mount_points.h" |
| 32 #include "storage/browser/fileapi/file_system_context.h" | 31 #include "storage/browser/fileapi/file_system_context.h" |
| 33 #include "storage/browser/fileapi/file_system_url.h" | 32 #include "storage/browser/fileapi/file_system_url.h" |
| 33 #include "storage/browser/test/test_file_system_context.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 | 35 |
| 36 namespace chromeos { | 36 namespace chromeos { |
| 37 namespace file_system_provider { | 37 namespace file_system_provider { |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj"; | 40 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj"; |
| 41 const char kFileSystemId[] = "testing-file-system"; | 41 const char kFileSystemId[] = "testing-file-system"; |
| 42 | 42 |
| 43 // Logs callbacks invocations on the tested operations. | 43 // Logs callbacks invocations on the tested operations. |
| (...skipping 365 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 |