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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 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/plugins/ppapi/plugin_module.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 10 matching lines...) Expand all
21 #include "webkit/fileapi/file_system_context.h" 21 #include "webkit/fileapi/file_system_context.h"
22 #include "webkit/fileapi/file_system_operation_context.h" 22 #include "webkit/fileapi/file_system_operation_context.h"
23 #include "webkit/fileapi/file_system_path_manager.h" 23 #include "webkit/fileapi/file_system_path_manager.h"
24 #include "webkit/fileapi/file_system_util.h" 24 #include "webkit/fileapi/file_system_util.h"
25 25
26 namespace fileapi { 26 namespace fileapi {
27 27
28 class MockFileSystemPathManager : public FileSystemPathManager { 28 class MockFileSystemPathManager : public FileSystemPathManager {
29 public: 29 public:
30 explicit MockFileSystemPathManager(const FilePath& profile_path) 30 explicit MockFileSystemPathManager(const FilePath& profile_path)
31 : FileSystemPathManager(base::MessageLoopProxy::CreateForCurrentThread(), 31 : FileSystemPathManager(base::MessageLoopProxy::current(),
32 profile_path, NULL, false, true) {} 32 profile_path, NULL, false, true) {}
33 }; 33 };
34 34
35 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test { 35 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test {
36 public: 36 public:
37 void SetUp() { 37 void SetUp() {
38 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 38 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
39 path_manager_.reset(new MockFileSystemPathManager(data_dir_.path())); 39 path_manager_.reset(new MockFileSystemPathManager(data_dir_.path()));
40 } 40 }
41 41
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 public: 154 public:
155 SandboxMountPointProviderMigrationTest() : 155 SandboxMountPointProviderMigrationTest() :
156 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { 156 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {
157 } 157 }
158 158
159 void SetUp() { 159 void SetUp() {
160 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 160 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
161 path_manager_ = new MockFileSystemPathManager(data_dir_.path()); 161 path_manager_ = new MockFileSystemPathManager(data_dir_.path());
162 162
163 file_system_context_ = new FileSystemContext( 163 file_system_context_ = new FileSystemContext(
164 base::MessageLoopProxy::CreateForCurrentThread(), 164 base::MessageLoopProxy::current(),
165 base::MessageLoopProxy::CreateForCurrentThread(), 165 base::MessageLoopProxy::current(),
166 new TestSpecialStoragePolicy(true /* unlimited quota */), 166 new TestSpecialStoragePolicy(true /* unlimited quota */),
167 NULL, 167 NULL,
168 data_dir_.path(), 168 data_dir_.path(),
169 false, // incognito 169 false, // incognito
170 true, // allow_file_access_from_files 170 true, // allow_file_access_from_files
171 true, // unlimited quota 171 true, // unlimited quota
172 path_manager_); 172 path_manager_);
173 } 173 }
174 174
175 FileSystemPathManager* path_manager() { 175 FileSystemPathManager* path_manager() {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) { 417 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) {
418 RunMigrationTest(8); 418 RunMigrationTest(8);
419 } 419 }
420 420
421 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) { 421 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) {
422 RunMigrationTest(9); 422 RunMigrationTest(9);
423 } 423 }
424 424
425 } // namespace fileapi 425 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698