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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/leveldb/main.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 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"
11 #include "mojo/public/cpp/bindings/binding_set.h" 11 #include "mojo/public/cpp/bindings/binding_set.h"
12 #include "mojo/util/capture_util.h" 12 #include "mojo/util/capture_util.h"
13 #include "services/shell/public/cpp/shell_connection.h" 13 #include "services/shell/public/cpp/shell_connection.h"
14 #include "services/shell/public/cpp/shell_test.h" 14 #include "services/shell/public/cpp/shell_test.h"
15 15
16 using filesystem::FileError; 16 using filesystem::FileError;
17 using mojo::Capture; 17 using mojo::Capture;
18 18
19 namespace leveldb { 19 namespace leveldb {
20 namespace { 20 namespace {
21 21
22 class LevelDBServiceTest : public mojo::test::ShellTest { 22 class LevelDBServiceTest : public shell::test::ShellTest {
23 public: 23 public:
24 LevelDBServiceTest() : ShellTest("exe:leveldb_service_unittests") {} 24 LevelDBServiceTest() : ShellTest("exe:leveldb_service_unittests") {}
25 ~LevelDBServiceTest() override {} 25 ~LevelDBServiceTest() 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 ShellTest::SetUp(); 30 ShellTest::SetUp();
31 connector()->ConnectToInterface("mojo:filesystem", &files_); 31 connector()->ConnectToInterface("mojo:filesystem", &files_);
32 connector()->ConnectToInterface("mojo:leveldb", &leveldb_); 32 connector()->ConnectToInterface("mojo:leveldb", &leveldb_);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 database->Get(mojo::Array<uint8_t>::From(std::string("key")), 370 database->Get(mojo::Array<uint8_t>::From(std::string("key")),
371 Capture(&error, &value)); 371 Capture(&error, &value));
372 ASSERT_TRUE(database.WaitForIncomingResponse()); 372 ASSERT_TRUE(database.WaitForIncomingResponse());
373 EXPECT_EQ(DatabaseError::NOT_FOUND, error); 373 EXPECT_EQ(DatabaseError::NOT_FOUND, error);
374 EXPECT_EQ("", value.To<std::string>()); 374 EXPECT_EQ("", value.To<std::string>());
375 } 375 }
376 376
377 377
378 } // namespace 378 } // namespace
379 } // namespace leveldb 379 } // namespace leveldb
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | components/leveldb/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698