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

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

Issue 2316043002: //content: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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
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 <stdint.h> 5 #include <stdint.h>
6 #include <limits> 6 #include <limits>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 const char** content_data_; 256 const char** content_data_;
257 257
258 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJobFactory); 258 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJobFactory);
259 }; 259 };
260 260
261 } // namespace (anonymous) 261 } // namespace (anonymous)
262 262
263 void FileWriterDelegateTest::SetUp() { 263 void FileWriterDelegateTest::SetUp() {
264 ASSERT_TRUE(dir_.CreateUniqueTempDir()); 264 ASSERT_TRUE(dir_.CreateUniqueTempDir());
265 265
266 file_system_context_ = CreateFileSystemContextForTesting( 266 file_system_context_ =
267 NULL, dir_.path()); 267 CreateFileSystemContextForTesting(NULL, dir_.GetPath());
268 ASSERT_EQ(base::File::FILE_OK, 268 ASSERT_EQ(base::File::FILE_OK,
269 AsyncFileTestHelper::CreateFile(file_system_context_.get(), 269 AsyncFileTestHelper::CreateFile(file_system_context_.get(),
270 GetFileSystemURL("test"))); 270 GetFileSystemURL("test")));
271 job_factory_.reset(new BlobURLRequestJobFactory(&content_)); 271 job_factory_.reset(new BlobURLRequestJobFactory(&content_));
272 empty_context_.set_job_factory(job_factory_.get()); 272 empty_context_.set_job_factory(job_factory_.get());
273 } 273 }
274 274
275 void FileWriterDelegateTest::TearDown() { 275 void FileWriterDelegateTest::TearDown() {
276 file_system_context_ = NULL; 276 file_system_context_ = NULL;
277 base::RunLoop().RunUntilIdle(); 277 base::RunLoop().RunUntilIdle();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 file_writer_delegate_.reset(); 500 file_writer_delegate_.reset();
501 501
502 EXPECT_EQ(pre_write_usage + allowed_growth, usage()); 502 EXPECT_EQ(pre_write_usage + allowed_growth, usage());
503 EXPECT_EQ(GetFileSizeOnDisk("test"), usage()); 503 EXPECT_EQ(GetFileSizeOnDisk("test"), usage());
504 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written()); 504 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written());
505 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status()); 505 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status());
506 } 506 }
507 } 507 }
508 508
509 } // namespace content 509 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698