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

Side by Side Diff: components/leveldb/leveldb_apptest.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 9 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 | « components/leveldb/leveldb_app.cc ('k') | components/mus/mus_app.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/macros.h" 5 #include "base/macros.h"
6 #include "components/filesystem/public/interfaces/directory.mojom.h" 6 #include "components/filesystem/public/interfaces/directory.mojom.h"
7 #include "components/filesystem/public/interfaces/file_system.mojom.h" 7 #include "components/filesystem/public/interfaces/file_system.mojom.h"
8 #include "components/filesystem/public/interfaces/types.mojom.h" 8 #include "components/filesystem/public/interfaces/types.mojom.h"
9 #include "components/leveldb/public/interfaces/leveldb.mojom.h" 9 #include "components/leveldb/public/interfaces/leveldb.mojom.h"
10 #include "mojo/common/common_type_converters.h" 10 #include "mojo/common/common_type_converters.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class LevelDBApptest : public mojo::test::ApplicationTestBase { 22 class LevelDBApptest : public mojo::test::ApplicationTestBase {
23 public: 23 public:
24 LevelDBApptest() {} 24 LevelDBApptest() {}
25 ~LevelDBApptest() override {} 25 ~LevelDBApptest() override {}
26 26
27 protected: 27 protected:
28 // Overridden from mojo::test::ApplicationTestBase: 28 // Overridden from mojo::test::ApplicationTestBase:
29 void SetUp() override { 29 void SetUp() override {
30 ApplicationTestBase::SetUp(); 30 ApplicationTestBase::SetUp();
31 shell()->ConnectToInterface("mojo:filesystem", &files_); 31 connector()->ConnectToInterface("mojo:filesystem", &files_);
32 shell()->ConnectToInterface("mojo:leveldb", &leveldb_); 32 connector()->ConnectToInterface("mojo:leveldb", &leveldb_);
33 } 33 }
34 34
35 // Note: This has an out parameter rather than returning the |DirectoryPtr|, 35 // Note: This has an out parameter rather than returning the |DirectoryPtr|,
36 // since |ASSERT_...()| doesn't work with return values. 36 // since |ASSERT_...()| doesn't work with return values.
37 void GetUserDataDir(filesystem::DirectoryPtr* directory) { 37 void GetUserDataDir(filesystem::DirectoryPtr* directory) {
38 FileError error = FileError::FAILED; 38 FileError error = FileError::FAILED;
39 files()->OpenPersistentFileSystem(GetProxy(directory), 39 files()->OpenPersistentFileSystem(GetProxy(directory),
40 mojo::Capture(&error)); 40 mojo::Capture(&error));
41 ASSERT_TRUE(files().WaitForIncomingResponse()); 41 ASSERT_TRUE(files().WaitForIncomingResponse());
42 ASSERT_EQ(FileError::OK, error); 42 ASSERT_EQ(FileError::OK, error);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 database->GetFromSnapshot( 286 database->GetFromSnapshot(
287 invalid_snapshot, 287 invalid_snapshot,
288 mojo::Array<uint8_t>::From(std::string("key")), 288 mojo::Array<uint8_t>::From(std::string("key")),
289 Capture(&error, &value)); 289 Capture(&error, &value));
290 ASSERT_TRUE(database.WaitForIncomingResponse()); 290 ASSERT_TRUE(database.WaitForIncomingResponse());
291 EXPECT_EQ(DatabaseError::INVALID_ARGUMENT, error); 291 EXPECT_EQ(DatabaseError::INVALID_ARGUMENT, error);
292 } 292 }
293 293
294 } // namespace 294 } // namespace
295 } // namespace leveldb 295 } // namespace leveldb
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | components/mus/mus_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698