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

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

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comment Created 8 years, 4 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 "webkit/fileapi/file_system_url_request_job.h" 5 #include "webkit/fileapi/file_system_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual void SetUp() OVERRIDE { 67 virtual void SetUp() OVERRIDE {
68 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 68 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
69 69
70 special_storage_policy_ = new quota::MockSpecialStoragePolicy; 70 special_storage_policy_ = new quota::MockSpecialStoragePolicy;
71 // We use the main thread so that we can get the root path synchronously. 71 // We use the main thread so that we can get the root path synchronously.
72 // TODO(adamk): Run this on the FILE thread we've created as well. 72 // TODO(adamk): Run this on the FILE thread we've created as well.
73 file_system_context_ = 73 file_system_context_ =
74 new FileSystemContext( 74 new FileSystemContext(
75 base::MessageLoopProxy::current(), 75 base::MessageLoopProxy::current(),
76 base::MessageLoopProxy::current(), 76 base::MessageLoopProxy::current(),
77 base::MessageLoopProxy::current(),
77 special_storage_policy_, NULL, 78 special_storage_policy_, NULL,
78 temp_dir_.path(), 79 temp_dir_.path(),
79 CreateDisallowFileAccessOptions()); 80 CreateDisallowFileAccessOptions());
80 81
81 file_system_context_->sandbox_provider()->ValidateFileSystemRoot( 82 file_system_context_->sandbox_provider()->ValidateFileSystemRoot(
82 GURL("http://remote/"), kFileSystemTypeTemporary, true, // create 83 GURL("http://remote/"), kFileSystemTypeTemporary, true, // create
83 base::Bind(&FileSystemURLRequestJobTest::OnValidateFileSystem, 84 base::Bind(&FileSystemURLRequestJobTest::OnValidateFileSystem,
84 weak_factory_.GetWeakPtr())); 85 weak_factory_.GetWeakPtr()));
85 MessageLoop::current()->RunAllPending(); 86 MessageLoop::current()->RunAllPending();
86 87
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 367
367 TestRequest(CreateFileSystemURL(kFilename)); 368 TestRequest(CreateFileSystemURL(kFilename));
368 369
369 std::string mime_type_from_job; 370 std::string mime_type_from_job;
370 request_->GetMimeType(&mime_type_from_job); 371 request_->GetMimeType(&mime_type_from_job);
371 EXPECT_EQ(mime_type_direct, mime_type_from_job); 372 EXPECT_EQ(mime_type_direct, mime_type_from_job);
372 } 373 }
373 374
374 } // namespace 375 } // namespace
375 } // namespace fileapi 376 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698