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

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

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "components/filesystem/public/interfaces/directory.mojom.h" 8 #include "components/filesystem/public/interfaces/directory.mojom.h"
9 #include "components/filesystem/public/interfaces/file_system.mojom.h" 9 #include "components/filesystem/public/interfaces/file_system.mojom.h"
10 #include "components/filesystem/public/interfaces/types.mojom.h" 10 #include "components/filesystem/public/interfaces/types.mojom.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void LevelDBSyncOpenInMemory(mojom::LevelDBService* leveldb, 97 void LevelDBSyncOpenInMemory(mojom::LevelDBService* leveldb,
98 mojom::LevelDBDatabaseRequest database, 98 mojom::LevelDBDatabaseRequest database,
99 mojom::DatabaseError* out_error) { 99 mojom::DatabaseError* out_error) {
100 base::RunLoop run_loop; 100 base::RunLoop run_loop;
101 leveldb->OpenInMemory(std::move(database), 101 leveldb->OpenInMemory(std::move(database),
102 Capture(out_error, run_loop.QuitClosure())); 102 Capture(out_error, run_loop.QuitClosure()));
103 run_loop.Run(); 103 run_loop.Run();
104 } 104 }
105 105
106 class LevelDBServiceTest : public shell::test::ServiceTest { 106 class LevelDBServiceTest : public service_manager::test::ServiceTest {
107 public: 107 public:
108 LevelDBServiceTest() : ServiceTest("exe:leveldb_service_unittests") {} 108 LevelDBServiceTest() : ServiceTest("exe:leveldb_service_unittests") {}
109 ~LevelDBServiceTest() override {} 109 ~LevelDBServiceTest() override {}
110 110
111 protected: 111 protected:
112 // Overridden from mojo::test::ApplicationTestBase: 112 // Overridden from mojo::test::ApplicationTestBase:
113 void SetUp() override { 113 void SetUp() override {
114 ServiceTest::SetUp(); 114 ServiceTest::SetUp();
115 connector()->ConnectToInterface("service:filesystem", &files_); 115 connector()->ConnectToInterface("service:filesystem", &files_);
116 connector()->ConnectToInterface("service:leveldb", &leveldb_); 116 connector()->ConnectToInterface("service:leveldb", &leveldb_);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 EXPECT_EQ(mojom::DatabaseError::OK, error); 497 EXPECT_EQ(mojom::DatabaseError::OK, error);
498 error = mojom::DatabaseError::INVALID_ARGUMENT; 498 error = mojom::DatabaseError::INVALID_ARGUMENT;
499 key_values.clear(); 499 key_values.clear();
500 DatabaseSyncGetPrefixed(database.get(), prefix, &error, &key_values); 500 DatabaseSyncGetPrefixed(database.get(), prefix, &error, &key_values);
501 EXPECT_EQ(mojom::DatabaseError::OK, error); 501 EXPECT_EQ(mojom::DatabaseError::OK, error);
502 EXPECT_TRUE(key_values.empty()); 502 EXPECT_TRUE(key_values.empty());
503 } 503 }
504 504
505 } // namespace 505 } // namespace
506 } // namespace leveldb 506 } // 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