Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
gtest_activity.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TESTING_ANDROID_NATIVE_ACTIVITY_GTEST_ACTIVITY_H_
6#define FLUTTER_TESTING_ANDROID_NATIVE_ACTIVITY_GTEST_ACTIVITY_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/fml/thread.h"
10#include "flutter/testing/android/native_activity/native_activity.h"
11
12namespace flutter {
13
14//------------------------------------------------------------------------------
15/// @brief A native activity subclass an in implementation of
16/// `flutter::NativeActivityMain` that return it.
17///
18/// This class runs a Google Test harness on a background thread and
19/// redirects progress updates to `logcat` instead of STDOUT.
20///
21class GTestActivity final : public NativeActivity {
22 public:
23 explicit GTestActivity(ANativeActivity* activity);
24
25 ~GTestActivity() override;
26
27 GTestActivity(const GTestActivity&) = delete;
28
30
31 // |NativeActivity|
33
34 private:
35 fml::Thread background_thread_;
36};
37
38} // namespace flutter
39
40#endif // FLUTTER_TESTING_ANDROID_NATIVE_ACTIVITY_GTEST_ACTIVITY_H_
A native activity subclass an in implementation of flutter::NativeActivityMain that return it.
void OnNativeWindowCreated(ANativeWindow *window) override
GTestActivity(const GTestActivity &)=delete
GTestActivity & operator=(const GTestActivity &)=delete
An instance of a native activity. Users of the native_activity_apk are meant to subclass this and ret...
GLFWwindow * window
Definition main.cc:45
struct ANativeWindow ANativeWindow