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

Side by Side Diff: webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 file_system_.TearDown(); 78 file_system_.TearDown();
79 message_loop_.RunUntilIdle(); 79 message_loop_.RunUntilIdle();
80 RevokeSyncableFileSystem(); 80 RevokeSyncableFileSystem();
81 } 81 }
82 82
83 FileSystemURL URL(const std::string& path) { 83 FileSystemURL URL(const std::string& path) {
84 return file_system_.URL(path); 84 return file_system_.URL(path);
85 } 85 }
86 86
87 LocalFileSyncStatus* sync_status() { 87 LocalFileSyncStatus* sync_status() {
88 return file_system_.file_system_context()->sync_context()->sync_status(); 88 return file_system_.mount_provider()->sync_context()->sync_status();
89 } 89 }
90 90
91 void ResetCallbackStatus() { 91 void ResetCallbackStatus() {
92 write_status_ = base::PLATFORM_FILE_ERROR_FAILED; 92 write_status_ = base::PLATFORM_FILE_ERROR_FAILED;
93 write_bytes_ = 0; 93 write_bytes_ = 0;
94 write_complete_ = false; 94 write_complete_ = false;
95 callback_count_ = 0; 95 callback_count_ = 0;
96 } 96 }
97 97
98 StatusCallback ExpectStatus(const tracked_objects::Location& location, 98 StatusCallback ExpectStatus(const tracked_objects::Location& location,
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 file_system_.operation_runner()->Truncate( 385 file_system_.operation_runner()->Truncate(
386 URL(kFile), 10, 386 URL(kFile), 10,
387 ExpectStatus(FROM_HERE, base::PLATFORM_FILE_ERROR_ABORT)); 387 ExpectStatus(FROM_HERE, base::PLATFORM_FILE_ERROR_ABORT));
388 file_system_.operation_runner()->Cancel( 388 file_system_.operation_runner()->Cancel(
389 id, ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK)); 389 id, ExpectStatus(FROM_HERE, base::PLATFORM_FILE_OK));
390 base::MessageLoop::current()->RunUntilIdle(); 390 base::MessageLoop::current()->RunUntilIdle();
391 EXPECT_EQ(2, callback_count_); 391 EXPECT_EQ(2, callback_count_);
392 } 392 }
393 393
394 } // namespace sync_file_system 394 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698