OLD | NEW |
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...) Loading... |
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 |
OLD | NEW |