Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/unmount_unittest.cc

Issue 1221093002: Add support for refreshing contents of providers which don't support watchers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/unmount.h" 5 #include "chrome/browser/chromeos/file_system_provider/operations/unmount.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
30 } // namespace 30 } // namespace
31 31
32 class FileSystemProviderOperationsUnmountTest : public testing::Test { 32 class FileSystemProviderOperationsUnmountTest : public testing::Test {
33 protected: 33 protected:
34 FileSystemProviderOperationsUnmountTest() {} 34 FileSystemProviderOperationsUnmountTest() {}
35 ~FileSystemProviderOperationsUnmountTest() override {} 35 ~FileSystemProviderOperationsUnmountTest() override {}
36 36
37 void SetUp() override { 37 void SetUp() override {
38 file_system_info_ = ProvidedFileSystemInfo( 38 file_system_info_ = ProvidedFileSystemInfo(
39 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */), 39 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */),
40 base::FilePath(), false /* configurable */, extensions::SOURCE_FILE); 40 base::FilePath(), false /* configurable */, true /* watchable */,
41 extensions::SOURCE_FILE);
41 } 42 }
42 43
43 ProvidedFileSystemInfo file_system_info_; 44 ProvidedFileSystemInfo file_system_info_;
44 }; 45 };
45 46
46 TEST_F(FileSystemProviderOperationsUnmountTest, Execute) { 47 TEST_F(FileSystemProviderOperationsUnmountTest, Execute) {
47 using extensions::api::file_system_provider::UnmountRequestedOptions; 48 using extensions::api::file_system_provider::UnmountRequestedOptions;
48 49
49 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); 50 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
50 util::StatusCallbackLog callback_log; 51 util::StatusCallbackLog callback_log;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 scoped_ptr<RequestValue>(new RequestValue()), 131 scoped_ptr<RequestValue>(new RequestValue()),
131 base::File::FILE_ERROR_NOT_FOUND); 132 base::File::FILE_ERROR_NOT_FOUND);
132 ASSERT_EQ(1u, callback_log.size()); 133 ASSERT_EQ(1u, callback_log.size());
133 base::File::Error event_result = callback_log[0]; 134 base::File::Error event_result = callback_log[0];
134 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, event_result); 135 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, event_result);
135 } 136 }
136 137
137 } // namespace operations 138 } // namespace operations
138 } // namespace file_system_provider 139 } // namespace file_system_provider
139 } // namespace chromeos 140 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698