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/android/javatests/mojo_test_case.h" | 5 #include "mojo/android/javatests/mojo_test_case.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/test/test_support_android.h" | 16 #include "base/test/test_support_android.h" |
17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "jni/MojoTestCase_jni.h" | 18 #include "jni/MojoTestCase_jni.h" |
19 #include "mojo/message_pump/message_pump_mojo.h" | 19 #include "mojo/message_pump/message_pump_mojo.h" |
20 | 20 |
| 21 using base::android::JavaParamRef; |
| 22 |
21 namespace { | 23 namespace { |
22 | 24 |
23 struct TestEnvironment { | 25 struct TestEnvironment { |
24 TestEnvironment() : message_loop(mojo::common::MessagePumpMojo::Create()) {} | 26 TestEnvironment() : message_loop(mojo::common::MessagePumpMojo::Create()) {} |
25 | 27 |
26 base::ShadowingAtExitManager at_exit; | 28 base::ShadowingAtExitManager at_exit; |
27 base::MessageLoop message_loop; | 29 base::MessageLoop message_loop; |
28 }; | 30 }; |
29 | 31 |
30 } // namespace | 32 } // namespace |
(...skipping 29 matching lines...) Expand all Loading... |
60 run_loop.RunUntilIdle(); | 62 run_loop.RunUntilIdle(); |
61 } | 63 } |
62 } | 64 } |
63 | 65 |
64 bool RegisterMojoTestCase(JNIEnv* env) { | 66 bool RegisterMojoTestCase(JNIEnv* env) { |
65 return RegisterNativesImpl(env); | 67 return RegisterNativesImpl(env); |
66 } | 68 } |
67 | 69 |
68 } // namespace android | 70 } // namespace android |
69 } // namespace mojo | 71 } // namespace mojo |
OLD | NEW |