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

Unified Diff: services/shell/background/tests/background_shell_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/shell/background/background_shell_main.cc ('k') | services/shell/background/tests/test.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/background/tests/background_shell_unittest.cc
diff --git a/services/shell/background/tests/background_shell_unittest.cc b/services/shell/background/tests/background_shell_unittest.cc
index 28cc5e3b2793e6e2e84a03b04a5360491d7051a5..0e945f64d18655e722f02f1a88722d7418bef194 100644
--- a/services/shell/background/tests/background_shell_unittest.cc
+++ b/services/shell/background/tests/background_shell_unittest.cc
@@ -4,6 +4,9 @@
#include "services/shell/background/background_shell.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "services/shell/background/tests/test.mojom.h"
#include "services/shell/background/tests/test_catalog_store.h"
@@ -12,7 +15,6 @@
#include "services/shell/public/cpp/shell_connection.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace mojo {
namespace shell {
namespace {
@@ -27,10 +29,10 @@ class ShellClientImpl : public ShellClient {
DISALLOW_COPY_AND_ASSIGN(ShellClientImpl);
};
-scoped_ptr<TestCatalogStore> BuildTestCatalogStore() {
- scoped_ptr<base::ListValue> apps(new base::ListValue);
+std::unique_ptr<TestCatalogStore> BuildTestCatalogStore() {
+ std::unique_ptr<base::ListValue> apps(new base::ListValue);
apps->Append(BuildPermissiveSerializedAppInfo(kTestName, "test"));
- return make_scoped_ptr(new TestCatalogStore(std::move(apps)));
+ return base::WrapUnique(new TestCatalogStore(std::move(apps)));
}
} // namespace
@@ -48,9 +50,9 @@ scoped_ptr<TestCatalogStore> BuildTestCatalogStore() {
TEST(BackgroundShellTest, MAYBE_Basic) {
base::MessageLoop message_loop;
BackgroundShell background_shell;
- scoped_ptr<BackgroundShell::InitParams> init_params(
+ std::unique_ptr<BackgroundShell::InitParams> init_params(
new BackgroundShell::InitParams);
- scoped_ptr<TestCatalogStore> store_ptr = BuildTestCatalogStore();
+ std::unique_ptr<TestCatalogStore> store_ptr = BuildTestCatalogStore();
TestCatalogStore* store = store_ptr.get();
init_params->catalog_store = std::move(store_ptr);
background_shell.Init(std::move(init_params));
@@ -72,4 +74,3 @@ TEST(BackgroundShellTest, MAYBE_Basic) {
}
} // namespace shell
-} // namespace mojo
« no previous file with comments | « services/shell/background/background_shell_main.cc ('k') | services/shell/background/tests/test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698