| 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/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/test/test_support_android.h" | 14 #include "base/test/test_support_android.h" |
| 15 #include "jni/MojoTestCase_jni.h" | 15 #include "jni/MojoTestCase_jni.h" |
| 16 #include "mojo/message_pump/message_pump_mojo.h" | 16 #include "mojo/message_pump/message_pump_mojo.h" |
| 17 #include "mojo/public/cpp/environment/environment.h" | |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 struct TestEnvironment { | 20 struct TestEnvironment { |
| 22 TestEnvironment() : message_loop(mojo::common::MessagePumpMojo::Create()) {} | 21 TestEnvironment() : message_loop(mojo::common::MessagePumpMojo::Create()) {} |
| 23 | 22 |
| 24 base::ShadowingAtExitManager at_exit; | 23 base::ShadowingAtExitManager at_exit; |
| 25 base::MessageLoop message_loop; | 24 base::MessageLoop message_loop; |
| 26 }; | 25 }; |
| 27 | 26 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 58 run_loop.RunUntilIdle(); | 57 run_loop.RunUntilIdle(); |
| 59 } | 58 } |
| 60 } | 59 } |
| 61 | 60 |
| 62 bool RegisterMojoTestCase(JNIEnv* env) { | 61 bool RegisterMojoTestCase(JNIEnv* env) { |
| 63 return RegisterNativesImpl(env); | 62 return RegisterNativesImpl(env); |
| 64 } | 63 } |
| 65 | 64 |
| 66 } // namespace android | 65 } // namespace android |
| 67 } // namespace mojo | 66 } // namespace mojo |
| OLD | NEW |