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

Side by Side Diff: webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "webkit/browser/fileapi/syncable/syncable_file_system_util.h" 5 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_refptr<LocalFileSyncContext> sync_context = 125 scoped_refptr<LocalFileSyncContext> sync_context =
126 new LocalFileSyncContext(base::MessageLoopProxy::current(), 126 new LocalFileSyncContext(base::MessageLoopProxy::current(),
127 base::MessageLoopProxy::current()); 127 base::MessageLoopProxy::current());
128 128
129 // Before calling initialization we would not be able to get a valid 129 // Before calling initialization we would not be able to get a valid
130 // deserialized URL. 130 // deserialized URL.
131 EXPECT_FALSE(DeserializeSyncableFileSystemURL(serialized, &deserialized)); 131 EXPECT_FALSE(DeserializeSyncableFileSystemURL(serialized, &deserialized));
132 EXPECT_FALSE(deserialized.is_valid()); 132 EXPECT_FALSE(deserialized.is_valid());
133 133
134 ASSERT_EQ(sync_file_system::SYNC_STATUS_OK, 134 ASSERT_EQ(sync_file_system::SYNC_STATUS_OK,
135 file_system.MaybeInitializeFileSystemContext(sync_context)); 135 file_system.MaybeInitializeFileSystemContext(sync_context.get()));
136 136
137 // After initialization this should be ok (even before opening the file 137 // After initialization this should be ok (even before opening the file
138 // system). 138 // system).
139 EXPECT_TRUE(DeserializeSyncableFileSystemURL(serialized, &deserialized)); 139 EXPECT_TRUE(DeserializeSyncableFileSystemURL(serialized, &deserialized));
140 EXPECT_TRUE(deserialized.is_valid()); 140 EXPECT_TRUE(deserialized.is_valid());
141 141
142 // Shutting down. 142 // Shutting down.
143 file_system.TearDown(); 143 file_system.TearDown();
144 RevokeSyncableFileSystem(kServiceName); 144 RevokeSyncableFileSystem(kServiceName);
145 sync_context->ShutdownOnUIThread(); 145 sync_context->ShutdownOnUIThread();
(...skipping 22 matching lines...) Expand all
168 CreateFileSystemURL(root2 + child))); 168 CreateFileSystemURL(root2 + child)));
169 169
170 // False case: different filesystem ID. 170 // False case: different filesystem ID.
171 EXPECT_FALSE(CreateFileSystemURL(root1 + parent).IsParent( 171 EXPECT_FALSE(CreateFileSystemURL(root1 + parent).IsParent(
172 CreateFileSystemURL(root2 + child))); 172 CreateFileSystemURL(root2 + child)));
173 EXPECT_FALSE(CreateFileSystemURL(root2 + parent).IsParent( 173 EXPECT_FALSE(CreateFileSystemURL(root2 + parent).IsParent(
174 CreateFileSystemURL(root1 + child))); 174 CreateFileSystemURL(root1 + child)));
175 } 175 }
176 176
177 } // namespace sync_file_system 177 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc ('k') | webkit/browser/fileapi/test_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698