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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/open_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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 false /* create */, 189 false /* create */,
190 base::Bind(&CallbackLogger::OnOpenFile, callback_logger.GetWeakPtr())); 190 base::Bind(&CallbackLogger::OnOpenFile, callback_logger.GetWeakPtr()));
191 open_file.SetDispatchEventImplForTesting( 191 open_file.SetDispatchEventImplForTesting(
192 base::Bind(&LoggingDispatchEventImpl::OnDispatchEventImpl, 192 base::Bind(&LoggingDispatchEventImpl::OnDispatchEventImpl,
193 base::Unretained(&dispatcher))); 193 base::Unretained(&dispatcher)));
194 194
195 EXPECT_TRUE(open_file.Execute(kRequestId)); 195 EXPECT_TRUE(open_file.Execute(kRequestId));
196 196
197 open_file.OnSuccess(kRequestId, 197 open_file.OnSuccess(kRequestId,
198 scoped_ptr<RequestValue>(new RequestValue()), 198 scoped_ptr<RequestValue>(new RequestValue()),
199 false /* has_next */); 199 false /* has_more */);
200 ASSERT_EQ(1u, callback_logger.events().size()); 200 ASSERT_EQ(1u, callback_logger.events().size());
201 CallbackLogger::Event* event = callback_logger.events()[0]; 201 CallbackLogger::Event* event = callback_logger.events()[0];
202 EXPECT_EQ(base::File::FILE_OK, event->result()); 202 EXPECT_EQ(base::File::FILE_OK, event->result());
203 EXPECT_LT(0, event->file_handle()); 203 EXPECT_LT(0, event->file_handle());
204 } 204 }
205 205
206 TEST_F(FileSystemProviderOperationsOpenFileTest, OnError) { 206 TEST_F(FileSystemProviderOperationsOpenFileTest, OnError) {
207 using extensions::api::file_system_provider_internal::OpenFileRequestedError:: 207 using extensions::api::file_system_provider_internal::OpenFileRequestedError::
208 Params; 208 Params;
209 209
(...skipping 16 matching lines...) Expand all
226 open_file.OnError(kRequestId, base::File::FILE_ERROR_TOO_MANY_OPENED); 226 open_file.OnError(kRequestId, base::File::FILE_ERROR_TOO_MANY_OPENED);
227 ASSERT_EQ(1u, callback_logger.events().size()); 227 ASSERT_EQ(1u, callback_logger.events().size());
228 CallbackLogger::Event* event = callback_logger.events()[0]; 228 CallbackLogger::Event* event = callback_logger.events()[0];
229 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); 229 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result());
230 ASSERT_EQ(0, event->file_handle()); 230 ASSERT_EQ(0, event->file_handle());
231 } 231 }
232 232
233 } // namespace operations 233 } // namespace operations
234 } // namespace file_system_provider 234 } // namespace file_system_provider
235 } // namespace chromeos 235 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698