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

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

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
Patch Set: . 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 | « sql/mojo/sql_test_base.cc ('k') | ui/views/mus/screen_mus.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 <stdint.h> 5 #include <stdint.h>
6 #include <memory> 6 #include <memory>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/filesystem/public/interfaces/file_system.mojom.h" 10 #include "components/filesystem/public/interfaces/file_system.mojom.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 scoped_ptr<sqlite3_file> MakeFile() { 48 scoped_ptr<sqlite3_file> MakeFile() {
49 return scoped_ptr<sqlite3_file>(reinterpret_cast<sqlite3_file*>( 49 return scoped_ptr<sqlite3_file>(reinterpret_cast<sqlite3_file*>(
50 new uint8_t[vfs()->szOsFile])); 50 new uint8_t[vfs()->szOsFile]));
51 } 51 }
52 52
53 void SetUp() override { 53 void SetUp() override {
54 mojo::test::ApplicationTestBase::SetUp(); 54 mojo::test::ApplicationTestBase::SetUp();
55 55
56 shell()->ConnectToService("mojo:filesystem", &files_); 56 shell()->ConnectToInterface("mojo:filesystem", &files_);
57 57
58 filesystem::FileError error = filesystem::FileError::FAILED; 58 filesystem::FileError error = filesystem::FileError::FAILED;
59 filesystem::DirectoryPtr directory; 59 filesystem::DirectoryPtr directory;
60 files_->OpenFileSystem("temp", GetProxy(&directory), 60 files_->OpenFileSystem("temp", GetProxy(&directory),
61 binding_.CreateInterfacePtrAndBind(), 61 binding_.CreateInterfacePtrAndBind(),
62 mojo::Capture(&error)); 62 mojo::Capture(&error));
63 ASSERT_TRUE(files_.WaitForIncomingResponse()); 63 ASSERT_TRUE(files_.WaitForIncomingResponse());
64 ASSERT_EQ(filesystem::FileError::OK, error); 64 ASSERT_EQ(filesystem::FileError::OK, error);
65 65
66 vfs_.reset(new ScopedMojoFilesystemVFS(std::move(directory))); 66 vfs_.reset(new ScopedMojoFilesystemVFS(std::move(directory)));
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 EXPECT_EQ(SQLITE_OK, rc); 331 EXPECT_EQ(SQLITE_OK, rc);
332 332
333 rc = file->pMethods->xFileSize(file.get(), &size); 333 rc = file->pMethods->xFileSize(file.get(), &size);
334 EXPECT_EQ(SQLITE_OK, rc); 334 EXPECT_EQ(SQLITE_OK, rc);
335 EXPECT_EQ(kCharsToThree, size); 335 EXPECT_EQ(kCharsToThree, size);
336 336
337 file->pMethods->xClose(file.get()); 337 file->pMethods->xClose(file.get());
338 } 338 }
339 339
340 } // namespace sql 340 } // namespace sql
OLDNEW
« no previous file with comments | « sql/mojo/sql_test_base.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698