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

Side by Side Diff: webkit/browser/fileapi/syncable/syncable_file_system_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/stl_util.h" 5 #include "base/stl_util.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "webkit/browser/fileapi/file_system_context.h" 7 #include "webkit/browser/fileapi/file_system_context.h"
8 #include "webkit/browser/fileapi/file_system_file_util.h" 8 #include "webkit/browser/fileapi/file_system_file_util.h"
9 #include "webkit/browser/fileapi/file_system_operation_context.h" 9 #include "webkit/browser/fileapi/file_system_operation_context.h"
10 #include "webkit/browser/fileapi/file_system_task_runners.h" 10 #include "webkit/browser/fileapi/file_system_task_runners.h"
(...skipping 16 matching lines...) Expand all
27 using fileapi::SandboxFileSystemTestHelper; 27 using fileapi::SandboxFileSystemTestHelper;
28 using quota::QuotaManager; 28 using quota::QuotaManager;
29 using quota::QuotaStatusCode; 29 using quota::QuotaStatusCode;
30 30
31 namespace sync_file_system { 31 namespace sync_file_system {
32 32
33 class SyncableFileSystemTest : public testing::Test { 33 class SyncableFileSystemTest : public testing::Test {
34 public: 34 public:
35 SyncableFileSystemTest() 35 SyncableFileSystemTest()
36 : file_system_(GURL("http://example.com/"), 36 : file_system_(GURL("http://example.com/"),
37 base::MessageLoopProxy::current(), 37 base::MessageLoopProxy::current().get(),
38 base::MessageLoopProxy::current()), 38 base::MessageLoopProxy::current().get()),
39 weak_factory_(this) {} 39 weak_factory_(this) {}
40 40
41 virtual void SetUp() { 41 virtual void SetUp() {
42 file_system_.SetUp(); 42 file_system_.SetUp();
43 43
44 sync_context_ = new LocalFileSyncContext(base::MessageLoopProxy::current(), 44 sync_context_ =
45 base::MessageLoopProxy::current()); 45 new LocalFileSyncContext(base::MessageLoopProxy::current().get(),
46 base::MessageLoopProxy::current().get());
46 ASSERT_EQ( 47 ASSERT_EQ(
47 sync_file_system::SYNC_STATUS_OK, 48 sync_file_system::SYNC_STATUS_OK,
48 file_system_.MaybeInitializeFileSystemContext(sync_context_.get())); 49 file_system_.MaybeInitializeFileSystemContext(sync_context_.get()));
49 } 50 }
50 51
51 virtual void TearDown() { 52 virtual void TearDown() {
52 if (sync_context_.get()) 53 if (sync_context_.get())
53 sync_context_->ShutdownOnUIThread(); 54 sync_context_->ShutdownOnUIThread();
54 sync_context_ = NULL; 55 sync_context_ = NULL;
55 56
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 277
277 // Now try copying the directory into the syncable file system, which should 278 // Now try copying the directory into the syncable file system, which should
278 // fail if directory operation is disabled. (http://crbug.com/161442) 279 // fail if directory operation is disabled. (http://crbug.com/161442)
279 EXPECT_NE(base::PLATFORM_FILE_OK, 280 EXPECT_NE(base::PLATFORM_FILE_OK,
280 file_system_.Copy(kSrcDir, URL("dest"))); 281 file_system_.Copy(kSrcDir, URL("dest")));
281 282
282 other_file_system_.TearDown(); 283 other_file_system_.TearDown();
283 } 284 }
284 285
285 } // namespace sync_file_system 286 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698