OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |