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

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

Issue 7397008: Deprecate RegisterProtocolFactory/(Un)RegisterInterceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indent. Created 9 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
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) 5 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit)
6 // rather than as part of test_shell_tests because they rely on being able 6 // rather than as part of test_shell_tests because they rely on being able
7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses 7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses
8 // TYPE_UI, which URLRequest doesn't allow. 8 // TYPE_UI, which URLRequest doesn't allow.
9 // 9 //
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return new FileWriterDelegateTestJob( 215 return new FileWriterDelegateTestJob(
216 request, FileWriterDelegateTest::content_); 216 request, FileWriterDelegateTest::content_);
217 } 217 }
218 218
219 void FileWriterDelegateTest::SetUp() { 219 void FileWriterDelegateTest::SetUp() {
220 ASSERT_TRUE(dir_.CreateUniqueTempDir()); 220 ASSERT_TRUE(dir_.CreateUniqueTempDir());
221 FilePath base_dir = dir_.path().AppendASCII("filesystem"); 221 FilePath base_dir = dir_.path().AppendASCII("filesystem");
222 SetUpTestHelper(base_dir); 222 SetUpTestHelper(base_dir);
223 ASSERT_TRUE(file_util::CreateTemporaryFileInDir( 223 ASSERT_TRUE(file_util::CreateTemporaryFileInDir(
224 test_helper_.GetOriginRootPath(), &file_path_)); 224 test_helper_.GetOriginRootPath(), &file_path_));
225 net::URLRequest::RegisterProtocolFactory("blob", &Factory); 225 net::URLRequest::Deprecated::RegisterProtocolFactory("blob", &Factory);
226 } 226 }
227 227
228 void FileWriterDelegateTest::TearDown() { 228 void FileWriterDelegateTest::TearDown() {
229 net::URLRequest::RegisterProtocolFactory("blob", NULL); 229 net::URLRequest::Deprecated::RegisterProtocolFactory("blob", NULL);
230 base::ClosePlatformFile(file_); 230 base::ClosePlatformFile(file_);
231 test_helper_.TearDown(); 231 test_helper_.TearDown();
232 } 232 }
233 233
234 FileSystemOperation* FileWriterDelegateTest::CreateNewOperation( 234 FileSystemOperation* FileWriterDelegateTest::CreateNewOperation(
235 Result* result, int64 quota) { 235 Result* result, int64 quota) {
236 FileSystemOperation* operation = test_helper_.NewOperation( 236 FileSystemOperation* operation = test_helper_.NewOperation(
237 new MockDispatcher(result)); 237 new MockDispatcher(result));
238 FileSystemOperationContext* context = 238 FileSystemOperationContext* context =
239 operation->file_system_operation_context(); 239 operation->file_system_operation_context();
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 EXPECT_EQ(kDataSize + FileSystemUsageCache::kUsageFileSize, 501 EXPECT_EQ(kDataSize + FileSystemUsageCache::kUsageFileSize,
502 test_helper_.GetCachedOriginUsage()); 502 test_helper_.GetCachedOriginUsage());
503 EXPECT_EQ(ComputeCurrentOriginUsage() + FileSystemUsageCache::kUsageFileSize, 503 EXPECT_EQ(ComputeCurrentOriginUsage() + FileSystemUsageCache::kUsageFileSize,
504 test_helper_.GetCachedOriginUsage()); 504 test_helper_.GetCachedOriginUsage());
505 EXPECT_EQ(kDataSize, result_->bytes_written()); 505 EXPECT_EQ(kDataSize, result_->bytes_written());
506 EXPECT_EQ(base::PLATFORM_FILE_OK, result_->status()); 506 EXPECT_EQ(base::PLATFORM_FILE_OK, result_->status());
507 EXPECT_TRUE(result_->complete()); 507 EXPECT_TRUE(result_->complete());
508 } 508 }
509 509
510 } // namespace fileapi 510 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698