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/operations/unobserve_entr
y.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/unobserve_entr
y.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 const base::FilePath::CharType kEntryPath[] = "/kitty/and/puppy/happy"; | 30 const base::FilePath::CharType kEntryPath[] = "/kitty/and/puppy/happy"; |
31 | 31 |
32 } // namespace | 32 } // namespace |
33 | 33 |
34 class FileSystemProviderOperationsUnobserveEntryTest : public testing::Test { | 34 class FileSystemProviderOperationsUnobserveEntryTest : public testing::Test { |
35 protected: | 35 protected: |
36 FileSystemProviderOperationsUnobserveEntryTest() {} | 36 FileSystemProviderOperationsUnobserveEntryTest() {} |
37 virtual ~FileSystemProviderOperationsUnobserveEntryTest() {} | 37 virtual ~FileSystemProviderOperationsUnobserveEntryTest() {} |
38 | 38 |
39 virtual void SetUp() override { | 39 virtual void SetUp() override { |
40 file_system_info_ = | 40 file_system_info_ = ProvidedFileSystemInfo( |
41 ProvidedFileSystemInfo(kExtensionId, | 41 kExtensionId, |
42 kFileSystemId, | 42 MountOptions(kFileSystemId, "" /* display_name */), |
43 "" /* file_system_name */, | 43 base::FilePath()); |
44 false /* writable */, | |
45 false /* supports_notify_tag */, | |
46 base::FilePath() /* mount_path */); | |
47 } | 44 } |
48 | 45 |
49 ProvidedFileSystemInfo file_system_info_; | 46 ProvidedFileSystemInfo file_system_info_; |
50 }; | 47 }; |
51 | 48 |
52 TEST_F(FileSystemProviderOperationsUnobserveEntryTest, Execute) { | 49 TEST_F(FileSystemProviderOperationsUnobserveEntryTest, Execute) { |
53 using extensions::api::file_system_provider::UnobserveEntryRequestedOptions; | 50 using extensions::api::file_system_provider::UnobserveEntryRequestedOptions; |
54 | 51 |
55 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); | 52 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
56 util::StatusCallbackLog callback_log; | 53 util::StatusCallbackLog callback_log; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 unobserve_entry.OnError(kRequestId, | 138 unobserve_entry.OnError(kRequestId, |
142 scoped_ptr<RequestValue>(new RequestValue()), | 139 scoped_ptr<RequestValue>(new RequestValue()), |
143 base::File::FILE_ERROR_TOO_MANY_OPENED); | 140 base::File::FILE_ERROR_TOO_MANY_OPENED); |
144 ASSERT_EQ(1u, callback_log.size()); | 141 ASSERT_EQ(1u, callback_log.size()); |
145 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, callback_log[0]); | 142 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, callback_log[0]); |
146 } | 143 } |
147 | 144 |
148 } // namespace operations | 145 } // namespace operations |
149 } // namespace file_system_provider | 146 } // namespace file_system_provider |
150 } // namespace chromeos | 147 } // namespace chromeos |
OLD | NEW |