5#include "flutter/testing/android/native_activity/gtest_activity.h"
7#include "flutter/impeller/toolkit/android/native_window.h"
8#include "flutter/testing/logger_listener.h"
9#include "flutter/testing/test_timeout_listener.h"
23 auto& listeners = ::testing::UnitTest::GetInstance()->listeners();
25 listeners.Append(timeout_listener);
26 listeners.Append(logger_listener);
28 int result = RUN_ALL_TESTS();
30 delete listeners.Release(timeout_listener);
31 delete listeners.Release(logger_listener);
38 auto handle = std::make_shared<impeller::android::NativeWindow>(
window);
44 ANativeActivity* activity,
46 return std::make_unique<GTestActivity>(activity);
GTestActivity(ANativeActivity *activity)
void OnNativeWindowCreated(ANativeWindow *window) override
~GTestActivity() override
An instance of a native activity. Users of the native_activity_apk are meant to subclass this and ret...
virtual void PostTask(const fml::closure &task) override
fml::RefPtr< fml::TaskRunner > GetTaskRunner() const
static constexpr TimeDelta FromSeconds(int64_t seconds)
A wrapper for ANativeWindow https://developer.android.com/ndk/reference/group/a-native-window.
#define FML_CHECK(condition)
std::unique_ptr< NativeActivity > NativeActivityMain(ANativeActivity *activity, std::unique_ptr< fml::Mapping > saved_state)
static void StartTestSuite(const impeller::android::NativeWindow &window)
struct ANativeWindow ANativeWindow