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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 const char kTestPackageName[] = "mojo:connect_test_package"; | 30 const char kTestPackageName[] = "mojo:connect_test_package"; |
31 const char kTestAppName[] = "mojo:connect_test_app"; | 31 const char kTestAppName[] = "mojo:connect_test_app"; |
32 const char kTestAppAName[] = "mojo:connect_test_a"; | 32 const char kTestAppAName[] = "mojo:connect_test_a"; |
33 const char kTestAppBName[] = "mojo:connect_test_b"; | 33 const char kTestAppBName[] = "mojo:connect_test_b"; |
34 const char kTestClassAppName[] = "mojo:connect_test_class_app"; | 34 const char kTestClassAppName[] = "mojo:connect_test_class_app"; |
35 const char kTestSingletonAppName[] = "mojo:connect_test_singleton_app"; | 35 const char kTestSingletonAppName[] = "mojo:connect_test_singleton_app"; |
36 const char kTestDriverName[] = "exe:connect_test_driver"; | 36 const char kTestDriverName[] = "exe:connect_test_driver"; |
37 | 37 |
38 void ReceiveOneString(std::string* out_string, | 38 void ReceiveOneString(std::string* out_string, |
39 base::RunLoop* loop, | 39 base::RunLoop* loop, |
40 const mojo::String& in_string) { | 40 mojo::String in_string) { |
41 *out_string = in_string; | 41 *out_string = in_string; |
42 loop->Quit(); | 42 loop->Quit(); |
43 } | 43 } |
44 | 44 |
45 void ReceiveTwoStrings(std::string* out_string_1, | 45 void ReceiveTwoStrings(std::string* out_string_1, |
46 std::string* out_string_2, | 46 std::string* out_string_2, |
47 base::RunLoop* loop, | 47 base::RunLoop* loop, |
48 const mojo::String& in_string_1, | 48 mojo::String in_string_1, |
49 const mojo::String& in_string_2) { | 49 mojo::String in_string_2) { |
50 *out_string_1 = in_string_1; | 50 *out_string_1 = in_string_1; |
51 *out_string_2 = in_string_2; | 51 *out_string_2 = in_string_2; |
52 loop->Quit(); | 52 loop->Quit(); |
53 } | 53 } |
54 | 54 |
55 void ReceiveConnectionResult(mojom::ConnectResult* out_result, | 55 void ReceiveConnectionResult(mojom::ConnectResult* out_result, |
56 Identity* out_target, | 56 Identity* out_target, |
57 base::RunLoop* loop, | 57 base::RunLoop* loop, |
58 int32_t in_result, | 58 int32_t in_result, |
59 mojom::IdentityPtr in_identity) { | 59 mojom::IdentityPtr in_identity) { |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 run_loop.Run(); | 463 run_loop.Run(); |
464 CompareConnectionState( | 464 CompareConnectionState( |
465 kTestAppAName, test_name(), test_userid(), test_instance_id(), | 465 kTestAppAName, test_name(), test_userid(), test_instance_id(), |
466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id); | 466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id); |
467 } | 467 } |
468 | 468 |
469 } | 469 } |
470 } | 470 } |
471 | 471 |
472 } // namespace shell | 472 } // namespace shell |
OLD | NEW |