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/examples/apptest/example_client_application.h" | 5 #include "examples/apptest/example_client_application.h" |
6 #include "mojo/examples/apptest/example_client_impl.h" | 6 #include "examples/apptest/example_client_impl.h" |
7 #include "mojo/examples/apptest/example_service.mojom.h" | 7 #include "examples/apptest/example_service.mojom.h" |
8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
9 #include "mojo/public/cpp/application/application_test_base.h" | 9 #include "mojo/public/cpp/application/application_test_base.h" |
10 #include "mojo/public/cpp/bindings/callback.h" | 10 #include "mojo/public/cpp/bindings/callback.h" |
11 #include "mojo/public/cpp/environment/logging.h" | 11 #include "mojo/public/cpp/environment/logging.h" |
12 #include "mojo/public/cpp/system/macros.h" | 12 #include "mojo/public/cpp/system/macros.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Exemplifies ApplicationTestBase's application testing pattern. | 17 // Exemplifies ApplicationTestBase's application testing pattern. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 TEST_F(ExampleApplicationTest, RunCallbackViaService) { | 70 TEST_F(ExampleApplicationTest, RunCallbackViaService) { |
71 // Test ExampleService callback functionality. | 71 // Test ExampleService callback functionality. |
72 bool was_run = false; | 72 bool was_run = false; |
73 example_service_->RunCallback(SetCallback<bool>(&was_run, true)); | 73 example_service_->RunCallback(SetCallback<bool>(&was_run, true)); |
74 EXPECT_TRUE(example_service_.WaitForIncomingMethodCall()); | 74 EXPECT_TRUE(example_service_.WaitForIncomingMethodCall()); |
75 EXPECT_TRUE(was_run); | 75 EXPECT_TRUE(was_run); |
76 } | 76 } |
77 | 77 |
78 } // namespace | 78 } // namespace |
79 } // namespace mojo | 79 } // namespace mojo |
OLD | NEW |