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

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

Issue 14096022: Make MountPointProvider pluggable from outside webkit/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 43 : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
44 additional_callback_count_(0), 44 additional_callback_count_(0),
45 deletion_status_(quota::kQuotaStatusUnknown) { 45 deletion_status_(quota::kQuotaStatusUnknown) {
46 } 46 }
47 47
48 virtual void SetUp() { 48 virtual void SetUp() {
49 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 49 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
50 file_system_context_ = 50 file_system_context_ =
51 new FileSystemContext( 51 new FileSystemContext(
52 FileSystemTaskRunners::CreateMockTaskRunners(), 52 FileSystemTaskRunners::CreateMockTaskRunners(),
53 ExternalMountPoints::CreateRefCounted().get(), 53 NULL,
54 NULL, NULL, 54 ScopedVector<FileSystemMountPointProvider>(),
55 std::vector<MountPoints*>(),
55 data_dir_.path(), 56 data_dir_.path(),
56 CreateDisallowFileAccessOptions()); 57 CreateDisallowFileAccessOptions());
57 } 58 }
58 59
59 struct TestFile { 60 struct TestFile {
60 bool isDirectory; 61 bool isDirectory;
61 const char* name; 62 const char* name;
62 int64 size; 63 int64 size;
63 const char* origin_url; 64 const char* origin_url;
64 quota::StorageType type; 65 quota::StorageType type;
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 GetOriginUsage(quota_client.get(), 587 GetOriginUsage(quota_client.get(),
587 "https://bar.com/", 588 "https://bar.com/",
588 kPersistent)); 589 kPersistent));
589 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, 590 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https,
590 GetOriginUsage(quota_client.get(), 591 GetOriginUsage(quota_client.get(),
591 "https://bar.com/", 592 "https://bar.com/",
592 kTemporary)); 593 kTemporary));
593 } 594 }
594 595
595 } // namespace fileapi 596 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698