Chromium Code Reviews

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

Issue 1977033002: Make ServiceRegistry (which implements) ApplicationConnection just wrap a ServiceProviderImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « mojo/public/cpp/application/service_provider_impl.h ('k') | no next file » | 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 "mojo/public/cpp/application/service_provider_impl.h" 5 #include "mojo/public/cpp/application/service_provider_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 320 matching lines...)
331 loop().Run(); 331 loop().Run();
332 } 332 }
333 loop().RunUntilIdle(); // Run stuff caused by destructors. 333 loop().RunUntilIdle(); // Run stuff caused by destructors.
334 334
335 sp.reset(); 335 sp.reset();
336 loop().RunUntilIdle(); 336 loop().RunUntilIdle();
337 337
338 EXPECT_FALSE(was_run); 338 EXPECT_FALSE(was_run);
339 } 339 }
340 340
341 TEST_F(ServiceProviderImplTest, ConstructRequestNotPending) {
342 ServiceProviderImpl impl(ConnectionContext(ConnectionContext::Type::INCOMING,
343 "https://example.com/remote.mojo",
344 "https://example.com/me.mojo"),
345 InterfaceRequest<ServiceProvider>());
346 EXPECT_EQ(ConnectionContext::Type::UNKNOWN, impl.connection_context().type);
347 EXPECT_EQ(std::string(), impl.connection_context().remote_url);
348 EXPECT_EQ(std::string(), impl.connection_context().connection_url);
349 }
350
341 // TODO(vtl): Explicitly test |AddServiceForName()|? 351 // TODO(vtl): Explicitly test |AddServiceForName()|?
342 352
343 } // namespace 353 } // namespace
344 } // namespace mojo 354 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/service_provider_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine