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

Side by Side Diff: mojo/application/public/cpp/tests/service_registry_unittest.cc

Issue 1139123006: Fork the mojo shell interfaces used by Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/public/cpp/application/lib/service_registry.h" 5 #include "mojo/application/public/cpp/lib/service_registry.h"
6 6
7 #include "mojo/public/cpp/application/service_connector.h" 7 #include "mojo/application/public/cpp/service_connector.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace internal { 11 namespace internal {
12 namespace { 12 namespace {
13 13
14 class TestConnector : public ServiceConnector { 14 class TestConnector : public ServiceConnector {
15 public: 15 public:
16 explicit TestConnector(int* delete_count) : delete_count_(delete_count) {} 16 explicit TestConnector(int* delete_count) : delete_count_(delete_count) {}
17 ~TestConnector() override { (*delete_count_)++; } 17 ~TestConnector() override { (*delete_count_)++; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 registry.SetServiceConnectorForName(new TestConnector(&delete_count), 61 registry.SetServiceConnectorForName(new TestConnector(&delete_count),
62 "TC1"); 62 "TC1");
63 EXPECT_EQ(5, delete_count); 63 EXPECT_EQ(5, delete_count);
64 } 64 }
65 EXPECT_EQ(6, delete_count); 65 EXPECT_EQ(6, delete_count);
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 } // namespace internal 69 } // namespace internal
70 } // namespace mojo 70 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698