| OLD | NEW |
| 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/bindings/allocation_scope.h" | 5 #include "mojo/public/bindings/allocation_scope.h" |
| 6 #include "mojo/public/bindings/remote_ptr.h" | 6 #include "mojo/public/bindings/remote_ptr.h" |
| 7 #include "mojo/public/environment/environment.h" | 7 #include "mojo/public/environment/environment.h" |
| 8 #include "mojo/public/shell/application.h" | 8 #include "mojo/public/shell/application.h" |
| 9 #include "mojo/public/shell/shell.mojom.h" |
| 9 #include "mojo/public/utility/run_loop.h" | 10 #include "mojo/public/utility/run_loop.h" |
| 10 #include "mojo/shell/service_manager.h" | 11 #include "mojo/shell/service_manager.h" |
| 11 #include "mojom/shell.h" | 12 #include "mojo/shell/test.mojom.h" |
| 12 #include "mojom/test.h" | |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 namespace shell { | 16 namespace shell { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 const char kTestURLString[] = "test:testService"; | 19 const char kTestURLString[] = "test:testService"; |
| 20 | 20 |
| 21 struct TestContext { | 21 struct TestContext { |
| 22 TestContext() : num_impls(0) {} | 22 TestContext() : num_impls(0) {} |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 EXPECT_TRUE(HasFactoryForTestURL()); | 129 EXPECT_TRUE(HasFactoryForTestURL()); |
| 130 loop_.Run(); | 130 loop_.Run(); |
| 131 EXPECT_EQ(1, context_.num_impls); | 131 EXPECT_EQ(1, context_.num_impls); |
| 132 test_client_.reset(NULL); | 132 test_client_.reset(NULL); |
| 133 loop_.Run(); | 133 loop_.Run(); |
| 134 EXPECT_EQ(0, context_.num_impls); | 134 EXPECT_EQ(0, context_.num_impls); |
| 135 EXPECT_FALSE(HasFactoryForTestURL()); | 135 EXPECT_FALSE(HasFactoryForTestURL()); |
| 136 } | 136 } |
| 137 } // namespace shell | 137 } // namespace shell |
| 138 } // namespace mojo | 138 } // namespace mojo |
| OLD | NEW |