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

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

Issue 304533003: [fsp] Rename has_next to has_more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 6 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 kOpenRequestId, 153 kOpenRequestId,
154 base::Bind(&CallbackLogger::OnCloseFile, callback_logger.GetWeakPtr())); 154 base::Bind(&CallbackLogger::OnCloseFile, callback_logger.GetWeakPtr()));
155 close_file.SetDispatchEventImplForTesting( 155 close_file.SetDispatchEventImplForTesting(
156 base::Bind(&LoggingDispatchEventImpl::OnDispatchEventImpl, 156 base::Bind(&LoggingDispatchEventImpl::OnDispatchEventImpl,
157 base::Unretained(&dispatcher))); 157 base::Unretained(&dispatcher)));
158 158
159 EXPECT_TRUE(close_file.Execute(kRequestId)); 159 EXPECT_TRUE(close_file.Execute(kRequestId));
160 160
161 close_file.OnSuccess(kRequestId, 161 close_file.OnSuccess(kRequestId,
162 scoped_ptr<RequestValue>(new RequestValue()), 162 scoped_ptr<RequestValue>(new RequestValue()),
163 false /* has_next */); 163 false /* has_more */);
164 ASSERT_EQ(1u, callback_logger.events().size()); 164 ASSERT_EQ(1u, callback_logger.events().size());
165 EXPECT_EQ(base::File::FILE_OK, callback_logger.events()[0]); 165 EXPECT_EQ(base::File::FILE_OK, callback_logger.events()[0]);
166 } 166 }
167 167
168 TEST_F(FileSystemProviderOperationsCloseFileTest, OnError) { 168 TEST_F(FileSystemProviderOperationsCloseFileTest, OnError) {
169 using extensions::api::file_system_provider_internal:: 169 using extensions::api::file_system_provider_internal::
170 CloseFileRequestedError::Params; 170 CloseFileRequestedError::Params;
171 171
172 LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); 172 LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
173 CallbackLogger callback_logger; 173 CallbackLogger callback_logger;
(...skipping 11 matching lines...) Expand all
185 185
186 close_file.OnError(kRequestId, base::File::FILE_ERROR_TOO_MANY_OPENED); 186 close_file.OnError(kRequestId, base::File::FILE_ERROR_TOO_MANY_OPENED);
187 ASSERT_EQ(1u, callback_logger.events().size()); 187 ASSERT_EQ(1u, callback_logger.events().size());
188 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, 188 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED,
189 callback_logger.events()[0]); 189 callback_logger.events()[0]);
190 } 190 }
191 191
192 } // namespace operations 192 } // namespace operations
193 } // namespace file_system_provider 193 } // namespace file_system_provider
194 } // namespace chromeos 194 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698