Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::LinuxTest Class Reference

#include <linux_test.h>

Inheritance diagram for flutter::testing::LinuxTest:
FlAccessibilityHandlerTest FlAccessibleNodeTest FlAccessibleTextFieldTest FlBasicMessageChannelTest FlBinaryMessengerTest FlCompositorOpenGLTest FlCompositorSoftwareTest FlDartProjectTest FlDisplayMonitorTest FlEngineTest FlEventChannelTest FlFramebufferTest FlGnomeSettingsTest FlKeyChannelResponderTest FlKeyEmbedderResponderTest FlKeyboardHandlerTest FlKeyboardLayoutTest FlMethodChannelTest FlPixelBufferTextureTest FlPlatformChannelTest FlPlatformHandlerTest FlPointerManagerTest FlScrollingManagerTest FlSettingsHandlerTest FlSettingsPortalTest FlTaskRunnerTest FlTextInputHandlerTest FlTextureGLTest FlTextureRegistrarTest FlTouchManagerTest FlViewAccessibleTest FlViewTest FlWindowStateMonitorTest

Public Member Functions

 LinuxTest ()
 
 ~LinuxTest () override
 

Protected Member Functions

void TearDown () override
 
void StartEngine (FlEngine *engine=nullptr)
 

Protected Attributes

GMainLoop * loop = nullptr
 
FlDartProject * project = nullptr
 
FlEngine * engine = nullptr
 

Detailed Description

The base class for all Linux test fixtures.

Test fixtures for the Linux embedder should inherit from this class instead of ::testing::Test so that common setup is shared between them.

Definition at line 22 of file linux_test.h.

Constructor & Destructor Documentation

◆ LinuxTest()

flutter::testing::LinuxTest::LinuxTest ( )

Definition at line 13 of file linux_test.cc.

13 {
15 loop = g_main_loop_new(nullptr, FALSE);
18}
FlDartProject * project
Definition linux_test.h:37
G_MODULE_EXPORT FlDartProject * fl_dart_project_new()
G_MODULE_EXPORT FlEngine * fl_engine_new(FlDartProject *project)
Definition fl_engine.cc:730
void fl_ensure_gtk_init(GLogWriterFunc writer)
Ensures that GTK has been initialized and starts monitoring logs.

References engine, fl_dart_project_new(), fl_engine_new(), flutter::testing::fl_ensure_gtk_init(), loop, and project.

◆ ~LinuxTest()

flutter::testing::LinuxTest::~LinuxTest ( )
override

Definition at line 20 of file linux_test.cc.

20 {
21 g_clear_object(&project);
22 g_clear_pointer(&loop, g_main_loop_unref);
23}

References loop, and project.

Member Function Documentation

◆ StartEngine()

void flutter::testing::LinuxTest::StartEngine ( FlEngine *  engine = nullptr)
protected

Definition at line 29 of file linux_test.cc.

29 {
30 if (engine == nullptr) {
31 engine = this->engine;
32 }
33 g_autoptr(GError) error = nullptr;
34 EXPECT_TRUE(fl_engine_start(engine, &error));
35 EXPECT_EQ(error, nullptr);
36}
g_autoptr(FlEngine) engine
gboolean fl_engine_start(FlEngine *self, GError **error)
Definition fl_engine.cc:759
const uint8_t uint32_t uint32_t GError ** error

References engine, error, fl_engine_start(), and g_autoptr().

Referenced by FlKeyboardHandlerTest::SetUp().

◆ TearDown()

void flutter::testing::LinuxTest::TearDown ( )
overrideprotected

Definition at line 25 of file linux_test.cc.

25 {
26 g_clear_object(&engine);
27}

References engine.

Member Data Documentation

◆ engine

◆ loop

GMainLoop* flutter::testing::LinuxTest::loop = nullptr
protected

Definition at line 34 of file linux_test.h.

Referenced by LinuxTest(), FlKeyChannelResponderTest::TestLockEvent(), and ~LinuxTest().

◆ project

FlDartProject* flutter::testing::LinuxTest::project = nullptr
protected

Definition at line 37 of file linux_test.h.

Referenced by LinuxTest(), and ~LinuxTest().


The documentation for this class was generated from the following files: