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

Side by Side Diff: webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 file_system_context_ = NULL; 49 file_system_context_ = NULL;
50 quota_manager_proxy_->SimulateQuotaManagerDestroyed(); 50 quota_manager_proxy_->SimulateQuotaManagerDestroyed();
51 quota_manager_ = NULL; 51 quota_manager_ = NULL;
52 quota_manager_proxy_ = NULL; 52 quota_manager_proxy_ = NULL;
53 base::MessageLoop::current()->RunUntilIdle(); 53 base::MessageLoop::current()->RunUntilIdle();
54 } 54 }
55 55
56 void SetUp() { 56 void SetUp() {
57 ASSERT_TRUE(base_.CreateUniqueTempDir()); 57 ASSERT_TRUE(base_.CreateUniqueTempDir());
58 base::FilePath base_dir = base_.path(); 58 base::FilePath base_dir = base_.path();
59 quota_manager_ = new quota::MockQuotaManager( 59 quota_manager_ =
60 false /* is_incognito */, base_dir, 60 new quota::MockQuotaManager(false /* is_incognito */,
61 base::MessageLoopProxy::current(), 61 base_dir,
62 base::MessageLoopProxy::current(), 62 base::MessageLoopProxy::current().get(),
63 NULL /* special storage policy */); 63 base::MessageLoopProxy::current().get(),
64 NULL /* special storage policy */);
64 quota_manager_proxy_ = new quota::MockQuotaManagerProxy( 65 quota_manager_proxy_ = new quota::MockQuotaManagerProxy(
65 quota_manager_.get(), base::MessageLoopProxy::current()); 66 quota_manager_.get(), base::MessageLoopProxy::current().get());
66 file_system_context_ = 67 file_system_context_ =
67 CreateFileSystemContextForTesting(quota_manager_proxy_.get(), base_dir); 68 CreateFileSystemContextForTesting(quota_manager_proxy_.get(), base_dir);
68 69
69 // Prepare the origin's root directory. 70 // Prepare the origin's root directory.
70 FileSystemMountPointProvider* mount_point_provider = 71 FileSystemMountPointProvider* mount_point_provider =
71 file_system_context_->GetMountPointProvider(src_type_); 72 file_system_context_->GetMountPointProvider(src_type_);
72 mount_point_provider->OpenFileSystem( 73 mount_point_provider->OpenFileSystem(
73 origin_, src_type_, 74 origin_, src_type_,
74 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, 75 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
75 base::Bind(&ExpectOk)); 76 base::Bind(&ExpectOk));
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 test::kRegularTestCaseSize); 420 test::kRegularTestCaseSize);
420 421
421 int64 src_new_usage = helper.GetSourceUsage(); 422 int64 src_new_usage = helper.GetSourceUsage();
422 ASSERT_EQ(src_initial_usage, src_new_usage); 423 ASSERT_EQ(src_initial_usage, src_new_usage);
423 424
424 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage; 425 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
425 ASSERT_EQ(src_increase, dest_increase); 426 ASSERT_EQ(src_increase, dest_increase);
426 } 427 }
427 428
428 } // namespace fileapi 429 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/dom_storage/dom_storage_context_unittest.cc ('k') | webkit/browser/fileapi/file_system_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698