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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/get_actions_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/get_actions.h" 5 #include "chrome/browser/chromeos/file_system_provider/operations/get_actions.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } // namespace 88 } // namespace
89 89
90 class FileSystemProviderOperationsGetActionsTest : public testing::Test { 90 class FileSystemProviderOperationsGetActionsTest : public testing::Test {
91 protected: 91 protected:
92 FileSystemProviderOperationsGetActionsTest() {} 92 FileSystemProviderOperationsGetActionsTest() {}
93 ~FileSystemProviderOperationsGetActionsTest() override {} 93 ~FileSystemProviderOperationsGetActionsTest() override {}
94 94
95 void SetUp() override { 95 void SetUp() override {
96 file_system_info_ = ProvidedFileSystemInfo( 96 file_system_info_ = ProvidedFileSystemInfo(
97 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */), 97 kExtensionId, MountOptions(kFileSystemId, "" /* display_name */),
98 base::FilePath(), false /* configurable */, extensions::SOURCE_FILE); 98 base::FilePath(), false /* configurable */, true /* watchable */,
99 extensions::SOURCE_FILE);
99 } 100 }
100 101
101 ProvidedFileSystemInfo file_system_info_; 102 ProvidedFileSystemInfo file_system_info_;
102 }; 103 };
103 104
104 TEST_F(FileSystemProviderOperationsGetActionsTest, Execute) { 105 TEST_F(FileSystemProviderOperationsGetActionsTest, Execute) {
105 using extensions::api::file_system_provider::GetActionsRequestedOptions; 106 using extensions::api::file_system_provider::GetActionsRequestedOptions;
106 107
107 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); 108 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
108 CallbackLogger callback_logger; 109 CallbackLogger callback_logger;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 227
227 ASSERT_EQ(1u, callback_logger.events().size()); 228 ASSERT_EQ(1u, callback_logger.events().size());
228 CallbackLogger::Event* event = callback_logger.events()[0]; 229 CallbackLogger::Event* event = callback_logger.events()[0];
229 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); 230 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result());
230 ASSERT_EQ(0u, event->actions().size()); 231 ASSERT_EQ(0u, event->actions().size());
231 } 232 }
232 233
233 } // namespace operations 234 } // namespace operations
234 } // namespace file_system_provider 235 } // namespace file_system_provider
235 } // namespace chromeos 236 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698