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

Side by Side Diff: webkit/browser/fileapi/file_writer_delegate_unittest.cc

Issue 15959006: Deprecate FileSystemMountPointProvider::GetFileSystemRootPathOnFileThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 FileSystemURL GetFileSystemURL(const char* file_name) const { 110 FileSystemURL GetFileSystemURL(const char* file_name) const {
111 return file_system_context_->CreateCrackedFileSystemURL( 111 return file_system_context_->CreateCrackedFileSystemURL(
112 kOrigin, kFileSystemType, base::FilePath().FromUTF8Unsafe(file_name)); 112 kOrigin, kFileSystemType, base::FilePath().FromUTF8Unsafe(file_name));
113 } 113 }
114 114
115 scoped_ptr<FileSystemOperationContext> NewOperationContext() { 115 scoped_ptr<FileSystemOperationContext> NewOperationContext() {
116 FileSystemOperationContext* context = 116 FileSystemOperationContext* context =
117 new FileSystemOperationContext(file_system_context_); 117 new FileSystemOperationContext(file_system_context_);
118 context->set_update_observers( 118 context->set_update_observers(
119 *file_system_context_->GetUpdateObservers(kFileSystemType)); 119 *file_system_context_->GetUpdateObservers(kFileSystemType));
120 context->set_root_path(dir_.path());
120 return make_scoped_ptr(context); 121 return make_scoped_ptr(context);
121 } 122 }
122 123
123 FileWriterDelegate* CreateWriterDelegate( 124 FileWriterDelegate* CreateWriterDelegate(
124 const char* test_file_path, 125 const char* test_file_path,
125 int64 offset, 126 int64 offset,
126 int64 allowed_growth, 127 int64 allowed_growth,
127 Result* result) { 128 Result* result) {
128 SandboxFileStreamWriter* writer = new SandboxFileStreamWriter( 129 SandboxFileStreamWriter* writer = new SandboxFileStreamWriter(
129 file_system_context_, 130 file_system_context_,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 file_writer_delegate_.reset(); 457 file_writer_delegate_.reset();
457 458
458 EXPECT_EQ(pre_write_usage + allowed_growth, 459 EXPECT_EQ(pre_write_usage + allowed_growth,
459 usage()); 460 usage());
460 EXPECT_EQ(GetFileSizeOnDisk("test"), usage()); 461 EXPECT_EQ(GetFileSizeOnDisk("test"), usage());
461 EXPECT_EQ(kOverlap + allowed_growth, result_->bytes_written()); 462 EXPECT_EQ(kOverlap + allowed_growth, result_->bytes_written());
462 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, result_->status()); 463 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NO_SPACE, result_->status());
463 } 464 }
464 465
465 } // namespace fileapi 466 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_context.h ('k') | webkit/browser/fileapi/isolated_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698