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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc

Issue 246913003: [fsp] Add support for reading directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 EXPECT_EQ(base::File::FILE_OK, *logger.error()); 284 EXPECT_EQ(base::File::FILE_OK, *logger.error());
285 } 285 }
286 286
287 TEST_F(FileSystemProviderProviderAsyncFileUtilTest, ReadDirectory) { 287 TEST_F(FileSystemProviderProviderAsyncFileUtilTest, ReadDirectory) {
288 EventLogger logger; 288 EventLogger logger;
289 289
290 async_file_util_->ReadDirectory( 290 async_file_util_->ReadDirectory(
291 CreateOperationContext(), 291 CreateOperationContext(),
292 root_url_, 292 root_url_,
293 base::Bind(&EventLogger::OnReadDirectory, logger.GetWeakPtr())); 293 base::Bind(&EventLogger::OnReadDirectory, logger.GetWeakPtr()));
294 base::RunLoop().RunUntilIdle();
294 295
295 ASSERT_TRUE(logger.error()); 296 ASSERT_TRUE(logger.error());
296 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, *logger.error()); 297 EXPECT_EQ(base::File::FILE_OK, *logger.error());
297 } 298 }
298 299
299 TEST_F(FileSystemProviderProviderAsyncFileUtilTest, Touch) { 300 TEST_F(FileSystemProviderProviderAsyncFileUtilTest, Touch) {
300 EventLogger logger; 301 EventLogger logger;
301 302
302 async_file_util_->CreateDirectory( 303 async_file_util_->CreateDirectory(
303 CreateOperationContext(), 304 CreateOperationContext(),
304 file_url_, 305 file_url_,
305 false, // exclusive 306 false, // exclusive
306 false, // recursive 307 false, // recursive
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 CreateOperationContext(), 409 CreateOperationContext(),
409 file_url_, 410 file_url_,
410 base::Bind(&EventLogger::OnCreateSnapshotFile, logger.GetWeakPtr())); 411 base::Bind(&EventLogger::OnCreateSnapshotFile, logger.GetWeakPtr()));
411 412
412 ASSERT_TRUE(logger.error()); 413 ASSERT_TRUE(logger.error());
413 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, *logger.error()); 414 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, *logger.error());
414 } 415 }
415 416
416 } // namespace file_system_provider 417 } // namespace file_system_provider
417 } // namespace chromeos 418 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698