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

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

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
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/file_system_context.h" 5 #include "webkit/fileapi/file_system_context.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 }; 40 };
41 41
42 scoped_refptr<FileSystemContext> NewFileSystemContext( 42 scoped_refptr<FileSystemContext> NewFileSystemContext(
43 bool allow_file_access, 43 bool allow_file_access,
44 bool unlimited_quota, 44 bool unlimited_quota,
45 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { 45 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) {
46 return new FileSystemContext(base::MessageLoopProxy::CreateForCurrentThread(), 46 return new FileSystemContext(base::MessageLoopProxy::CreateForCurrentThread(),
47 base::MessageLoopProxy::CreateForCurrentThread(), 47 base::MessageLoopProxy::CreateForCurrentThread(),
48 special_storage_policy, 48 special_storage_policy,
49 FilePath(), false /* is_incognito */, 49 FilePath(), false /* is_incognito */,
50 allow_file_access, unlimited_quota); 50 allow_file_access, unlimited_quota, NULL);
51 } 51 }
52 52
53 } // anonymous namespace 53 } // anonymous namespace
54 54
55 TEST(FileSystemContextTest, IsStorageUnlimited) { 55 TEST(FileSystemContextTest, IsStorageUnlimited) {
56 // Regular cases. 56 // Regular cases.
57 scoped_refptr<FileSystemContext> context( 57 scoped_refptr<FileSystemContext> context(
58 NewFileSystemContext(false, false, NULL)); 58 NewFileSystemContext(false, false, NULL));
59 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestOrigins); ++i) { 59 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestOrigins); ++i) {
60 SCOPED_TRACE(testing::Message() << "IsStorageUnlimited w/o policy #" 60 SCOPED_TRACE(testing::Message() << "IsStorageUnlimited w/o policy #"
(...skipping 22 matching lines...) Expand all
83 scoped_refptr<TestSpecialStoragePolicy> policy(new TestSpecialStoragePolicy); 83 scoped_refptr<TestSpecialStoragePolicy> policy(new TestSpecialStoragePolicy);
84 context = NewFileSystemContext(false, false, policy); 84 context = NewFileSystemContext(false, false, policy);
85 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestOrigins); ++i) { 85 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestOrigins); ++i) {
86 SCOPED_TRACE(testing::Message() << "IsStorageUnlimited /w policy #" 86 SCOPED_TRACE(testing::Message() << "IsStorageUnlimited /w policy #"
87 << i << " " << kTestOrigins[i]); 87 << i << " " << kTestOrigins[i]);
88 GURL origin(kTestOrigins[i]); 88 GURL origin(kTestOrigins[i]);
89 EXPECT_EQ(policy->IsStorageUnlimited(origin), 89 EXPECT_EQ(policy->IsStorageUnlimited(origin),
90 context->IsStorageUnlimited(origin)); 90 context->IsStorageUnlimited(origin));
91 } 91 }
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698