1 /* 2 * Copyright 2013 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ANDROID_GL_TEST_HELPER_H 18 #define ANDROID_GL_TEST_HELPER_H 19 20 #include <android/native_window_jni.h> 21 #include <gtest/gtest.h> 22 23 using namespace testing; 24 25 class GLTestHelper 26 { 27 private: 28 static ANativeWindow* mWindow; 29 static int runGTests(TestEventListener* listener, char * filter); 30 static int runTests(JNIEnv* env, jobject obj, jstring filter); 31 static int runTestsCTS(JNIEnv* env, jobject obj, jobject activity); 32 public: 33 static ANativeWindow* getWindow(); 34 static void setWindow(JNIEnv* env, jobject obj, jobject surface); 35 static int registerNative(JNIEnv* env); 36 }; 37 38 39 40 #endif // ANDROID_GL_TEST_HELPER_H 41