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

Side by Side Diff: sql/mojo/sql_test_base.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 10 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
« no previous file with comments | « net/proxy/proxy_resolver_factory_mojo.cc ('k') | sql/mojo/vfs_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sql/mojo/sql_test_base.h" 5 #include "sql/mojo/sql_test_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 file_ptr->Truncate(0, Capture(&error)); 132 file_ptr->Truncate(0, Capture(&error));
133 file_ptr.WaitForIncomingResponse(); 133 file_ptr.WaitForIncomingResponse();
134 ASSERT_EQ(filesystem::FileError::OK, error); 134 ASSERT_EQ(filesystem::FileError::OK, error);
135 } 135 }
136 136
137 void SQLTestBase::SetUp() { 137 void SQLTestBase::SetUp() {
138 ApplicationTestBase::SetUp(); 138 ApplicationTestBase::SetUp();
139 139
140 application_impl()->ConnectToService("mojo:filesystem", &files_); 140 application_impl()->ConnectToService("mojo:filesystem", &files_);
141 141
142 filesystem::FileSystemClientPtr client;
143 binding_.Bind(GetProxy(&client));
144
145 filesystem::FileError error = filesystem::FileError::FAILED; 142 filesystem::FileError error = filesystem::FileError::FAILED;
146 filesystem::DirectoryPtr directory; 143 filesystem::DirectoryPtr directory;
147 files()->OpenFileSystem("temp", GetProxy(&directory), std::move(client), 144 files()->OpenFileSystem("temp", GetProxy(&directory),
145 binding_.CreateInterfacePtrAndBind(),
148 Capture(&error)); 146 Capture(&error));
149 ASSERT_TRUE(files().WaitForIncomingResponse()); 147 ASSERT_TRUE(files().WaitForIncomingResponse());
150 ASSERT_EQ(filesystem::FileError::OK, error); 148 ASSERT_EQ(filesystem::FileError::OK, error);
151 149
152 vfs_.reset(new ScopedMojoFilesystemVFS(std::move(directory))); 150 vfs_.reset(new ScopedMojoFilesystemVFS(std::move(directory)));
153 ASSERT_TRUE(db_.Open(db_path())); 151 ASSERT_TRUE(db_.Open(db_path()));
154 } 152 }
155 153
156 void SQLTestBase::TearDown() { 154 void SQLTestBase::TearDown() {
157 db_.Close(); 155 db_.Close();
158 vfs_.reset(); 156 vfs_.reset();
159 157
160 ApplicationTestBase::TearDown(); 158 ApplicationTestBase::TearDown();
161 } 159 }
162 160
163 void SQLTestBase::OnFileSystemShutdown() { 161 void SQLTestBase::OnFileSystemShutdown() {
164 } 162 }
165 163
166 } // namespace sql 164 } // namespace sql
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_factory_mojo.cc ('k') | sql/mojo/vfs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698