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_dir_url_request_job.h" | 5 #include "webkit/fileapi/file_system_dir_url_request_job.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 virtual void SetUp() OVERRIDE { | 48 virtual void SetUp() OVERRIDE { |
49 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 49 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
50 | 50 |
51 file_thread_proxy_ = base::MessageLoopProxy::current(); | 51 file_thread_proxy_ = base::MessageLoopProxy::current(); |
52 | 52 |
53 special_storage_policy_ = new quota::MockSpecialStoragePolicy; | 53 special_storage_policy_ = new quota::MockSpecialStoragePolicy; |
54 file_system_context_ = | 54 file_system_context_ = |
55 new FileSystemContext( | 55 new FileSystemContext( |
56 file_thread_proxy_, | 56 file_thread_proxy_, |
| 57 file_thread_proxy_, |
57 base::MessageLoopProxy::current(), | 58 base::MessageLoopProxy::current(), |
58 special_storage_policy_, NULL, | 59 special_storage_policy_, NULL, |
59 temp_dir_.path(), | 60 temp_dir_.path(), |
60 CreateAllowFileAccessOptions()); | 61 CreateAllowFileAccessOptions()); |
61 | 62 |
62 file_system_context_->sandbox_provider()->ValidateFileSystemRoot( | 63 file_system_context_->sandbox_provider()->ValidateFileSystemRoot( |
63 GURL("http://remote/"), kFileSystemTypeTemporary, true, // create | 64 GURL("http://remote/"), kFileSystemTypeTemporary, true, // create |
64 base::Bind(&FileSystemDirURLRequestJobTest::OnValidateFileSystem, | 65 base::Bind(&FileSystemDirURLRequestJobTest::OnValidateFileSystem, |
65 weak_factory_.GetWeakPtr())); | 66 weak_factory_.GetWeakPtr())); |
66 MessageLoop::current()->RunAllPending(); | 67 MessageLoop::current()->RunAllPending(); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 CreateDirectory("foo"); | 288 CreateDirectory("foo"); |
288 TestRequestNoRun(CreateFileSystemURL("foo/")); | 289 TestRequestNoRun(CreateFileSystemURL("foo/")); |
289 // Run StartAsync() and only StartAsync(). | 290 // Run StartAsync() and only StartAsync(). |
290 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); | 291 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); |
291 MessageLoop::current()->RunAllPending(); | 292 MessageLoop::current()->RunAllPending(); |
292 // If we get here, success! we didn't crash! | 293 // If we get here, success! we didn't crash! |
293 } | 294 } |
294 | 295 |
295 } // namespace (anonymous) | 296 } // namespace (anonymous) |
296 } // namespace fileapi | 297 } // namespace fileapi |
OLD | NEW |