Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: mojo/android/javatests/mojo_test_case.cc

Issue 2050943002: Roll base to 9e74307b276b2f9988005c0e97e85ee222586f79. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/openssl_util.cc ('k') | mojo/message_pump/handle_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 16 matching lines...) Expand all
27 }; 27 };
28 28
29 } // namespace 29 } // namespace
30 30
31 namespace mojo { 31 namespace mojo {
32 namespace android { 32 namespace android {
33 33
34 static void InitApplicationContext(JNIEnv* env, 34 static void InitApplicationContext(JNIEnv* env,
35 const JavaParamRef<jobject>& jcaller, 35 const JavaParamRef<jobject>& jcaller,
36 const JavaParamRef<jobject>& context) { 36 const JavaParamRef<jobject>& context) {
37 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context); 37 base::android::InitApplicationContext(env, context);
38 base::android::InitApplicationContext(env, scoped_context);
39 base::InitAndroidTestMessageLoop(); 38 base::InitAndroidTestMessageLoop();
40 } 39 }
41 40
42 static jlong SetupTestEnvironment(JNIEnv* env, 41 static jlong SetupTestEnvironment(JNIEnv* env,
43 const JavaParamRef<jobject>& jcaller) { 42 const JavaParamRef<jobject>& jcaller) {
44 return reinterpret_cast<intptr_t>(new TestEnvironment()); 43 return reinterpret_cast<intptr_t>(new TestEnvironment());
45 } 44 }
46 45
47 static void TearDownTestEnvironment(JNIEnv* env, 46 static void TearDownTestEnvironment(JNIEnv* env,
48 const JavaParamRef<jobject>& jcaller, 47 const JavaParamRef<jobject>& jcaller,
(...skipping 15 matching lines...) Expand all
64 run_loop.RunUntilIdle(); 63 run_loop.RunUntilIdle();
65 } 64 }
66 } 65 }
67 66
68 bool RegisterMojoTestCase(JNIEnv* env) { 67 bool RegisterMojoTestCase(JNIEnv* env) {
69 return RegisterNativesImpl(env); 68 return RegisterNativesImpl(env);
70 } 69 }
71 70
72 } // namespace android 71 } // namespace android
73 } // namespace mojo 72 } // namespace mojo
OLDNEW
« no previous file with comments | « crypto/openssl_util.cc ('k') | mojo/message_pump/handle_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698