| 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 "shell/shell_test_base.h" | 5 #include "shell/shell_test_base.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "jni/ShellTestBase_jni.h" | 11 #include "jni/ShellTestBase_jni.h" |
| 12 #include "shell/filename_util.h" | 12 #include "shell/filename_util.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace mojo { | |
| 16 namespace shell { | 15 namespace shell { |
| 17 namespace test { | 16 namespace test { |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 JNIEnv* InitEnv() { | 20 JNIEnv* InitEnv() { |
| 22 JNIEnv* env = base::android::AttachCurrentThread(); | 21 JNIEnv* env = base::android::AttachCurrentThread(); |
| 23 static bool initialized = false; | 22 static bool initialized = false; |
| 24 if (!initialized) { | 23 if (!initialized) { |
| 25 RegisterNativesImpl(env); | 24 RegisterNativesImpl(env); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 37 base::android::ScopedJavaLocalRef<jstring> service_dir( | 36 base::android::ScopedJavaLocalRef<jstring> service_dir( |
| 38 Java_ShellTestBase_extractMojoApplications( | 37 Java_ShellTestBase_extractMojoApplications( |
| 39 env, base::android::GetApplicationContext())); | 38 env, base::android::GetApplicationContext())); |
| 40 shell_context_.url_resolver()->SetMojoBaseURL( | 39 shell_context_.url_resolver()->SetMojoBaseURL( |
| 41 FilePathToFileURL(base::FilePath( | 40 FilePathToFileURL(base::FilePath( |
| 42 base::android::ConvertJavaStringToUTF8(env, service_dir.obj())))); | 41 base::android::ConvertJavaStringToUTF8(env, service_dir.obj())))); |
| 43 } | 42 } |
| 44 | 43 |
| 45 } // namespace test | 44 } // namespace test |
| 46 } // namespace shell | 45 } // namespace shell |
| 47 } // namespace mojo | |
| OLD | NEW |