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/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // We always use the TEMPORARY FileSystem in this test. | 36 // We always use the TEMPORARY FileSystem in this test. |
37 static const char kFileSystemURLPrefix[] = | 37 static const char kFileSystemURLPrefix[] = |
38 "filesystem:http://remote/temporary/"; | 38 "filesystem:http://remote/temporary/"; |
39 | 39 |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 class FileSystemDirURLRequestJobTest : public testing::Test { | 42 class FileSystemDirURLRequestJobTest : public testing::Test { |
43 protected: | 43 protected: |
44 FileSystemDirURLRequestJobTest() | 44 FileSystemDirURLRequestJobTest() |
45 : message_loop_(MessageLoop::TYPE_IO), // simulate an IO thread | 45 : message_loop_(MessageLoop::TYPE_IO), // simulate an IO thread |
46 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 46 weak_factory_(this) { |
47 } | 47 } |
48 | 48 |
49 virtual void SetUp() OVERRIDE { | 49 virtual void SetUp() OVERRIDE { |
50 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 50 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
51 | 51 |
52 special_storage_policy_ = new quota::MockSpecialStoragePolicy; | 52 special_storage_policy_ = new quota::MockSpecialStoragePolicy; |
53 file_system_context_ = CreateFileSystemContextForTesting( | 53 file_system_context_ = CreateFileSystemContextForTesting( |
54 NULL, temp_dir_.path()); | 54 NULL, temp_dir_.path()); |
55 | 55 |
56 file_system_context_->sandbox_provider()->ValidateFileSystemRoot( | 56 file_system_context_->sandbox_provider()->ValidateFileSystemRoot( |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 CreateDirectory("foo"); | 280 CreateDirectory("foo"); |
281 TestRequestNoRun(CreateFileSystemURL("foo/")); | 281 TestRequestNoRun(CreateFileSystemURL("foo/")); |
282 // Run StartAsync() and only StartAsync(). | 282 // Run StartAsync() and only StartAsync(). |
283 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); | 283 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); |
284 MessageLoop::current()->RunUntilIdle(); | 284 MessageLoop::current()->RunUntilIdle(); |
285 // If we get here, success! we didn't crash! | 285 // If we get here, success! we didn't crash! |
286 } | 286 } |
287 | 287 |
288 } // namespace (anonymous) | 288 } // namespace (anonymous) |
289 } // namespace fileapi | 289 } // namespace fileapi |
OLD | NEW |