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

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

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix for windows 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
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | 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) 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/sandbox_mount_point_provider.h" 5 #include "webkit/fileapi/sandbox_mount_point_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/message_loop_proxy.h" 17 #include "base/message_loop_proxy.h"
18 #include "base/platform_file.h" 18 #include "base/platform_file.h"
19 #include "base/scoped_temp_dir.h" 19 #include "base/scoped_temp_dir.h"
20 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "webkit/fileapi/file_system_context.h" 22 #include "webkit/fileapi/file_system_context.h"
23 #include "webkit/fileapi/file_system_mount_point_provider.h" 23 #include "webkit/fileapi/file_system_mount_point_provider.h"
24 #include "webkit/fileapi/file_system_operation_context.h" 24 #include "webkit/fileapi/file_system_operation_context.h"
25 #include "webkit/fileapi/file_system_task_runners.h"
25 #include "webkit/fileapi/file_system_util.h" 26 #include "webkit/fileapi/file_system_util.h"
26 #include "webkit/fileapi/mock_file_system_options.h" 27 #include "webkit/fileapi/mock_file_system_options.h"
27 #include "webkit/quota/mock_special_storage_policy.h" 28 #include "webkit/quota/mock_special_storage_policy.h"
28 29
29 namespace fileapi { 30 namespace fileapi {
30 31
31 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test { 32 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test {
32 public: 33 public:
33 void SetUp() { 34 void SetUp() {
34 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 35 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 SandboxMountPointProviderMigrationTest() : 136 SandboxMountPointProviderMigrationTest() :
136 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 137 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
137 } 138 }
138 139
139 void SetUp() { 140 void SetUp() {
140 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 141 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
141 scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy = 142 scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
142 new quota::MockSpecialStoragePolicy; 143 new quota::MockSpecialStoragePolicy;
143 special_storage_policy->SetAllUnlimited(true); 144 special_storage_policy->SetAllUnlimited(true);
144 file_system_context_ = new FileSystemContext( 145 file_system_context_ = new FileSystemContext(
145 base::MessageLoopProxy::current(), 146 FileSystemTaskRunners::CreateMockTaskRunners(),
146 base::MessageLoopProxy::current(),
147 special_storage_policy, 147 special_storage_policy,
148 NULL, 148 NULL,
149 data_dir_.path(), 149 data_dir_.path(),
150 CreateAllowFileAccessOptions()); 150 CreateAllowFileAccessOptions());
151 } 151 }
152 152
153 SandboxMountPointProvider* sandbox_provider() { 153 SandboxMountPointProvider* sandbox_provider() {
154 return file_system_context_->sandbox_provider(); 154 return file_system_context_->sandbox_provider();
155 } 155 }
156 156
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) { 389 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) {
390 RunMigrationTest(8); 390 RunMigrationTest(8);
391 } 391 }
392 392
393 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) { 393 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) {
394 RunMigrationTest(9); 394 RunMigrationTest(9);
395 } 395 }
396 396
397 } // namespace fileapi 397 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698