5#include "gtest/gtest.h"
7#include "flutter/shell/platform/linux/testing/fl_test.h"
9#include "flutter/shell/platform/linux/fl_engine_private.h"
10#include "flutter/shell/platform/linux/testing/mock_renderer.h"
13class ImModuleEnv :
public ::testing::Environment {
15 void SetUp()
override {
16 setenv(
"GTK_IM_MODULE",
"gtk-im-context-simple",
true);
20testing::Environment*
const kEnv =
21 testing::AddGlobalTestEnvironment(
new ImModuleEnv);
28 return value -
'a' + 10;
30 return value -
'A' + 10;
37 if (hex_string[0] ==
'\0') {
44 GByteArray*
buffer = g_byte_array_new();
45 for (
int i = 0; hex_string[
i] !=
'\0' && hex_string[
i + 1] !=
'\0';
i += 2) {
49 return g_byte_array_free_to_bytes(
buffer);
53 GString* hex_string = g_string_new(
"");
56 static_cast<const uint8_t*
>(g_bytes_get_data(bytes, &data_length));
57 for (
size_t i = 0;
i < data_length;
i++) {
58 g_string_append_printf(hex_string,
"%02x",
data[
i]);
60 return g_string_free(hex_string,
FALSE);
71 g_autoptr(GError) engine_error =
nullptr;
73 EXPECT_EQ(engine_error,
nullptr);
75 return static_cast<FlEngine*
>(g_object_ref(
engine));
G_MODULE_EXPORT FlDartProject * fl_dart_project_new()
FlEngine * fl_engine_new(FlDartProject *project, FlRenderer *renderer)
gboolean fl_engine_start(FlEngine *self, GError **error)
g_byte_array_append(buffer, &type, sizeof(uint8_t))
static uint8_t hex_digit_to_int(char value)
FlEngine * make_mock_engine_with_project(FlDartProject *project)
void PrintTo(FlValue *v, std::ostream *os)
static uint8_t parse_hex8(const gchar *hex_string)
FlEngine * make_mock_engine()
GBytes * hex_string_to_bytes(const gchar *hex_string)
gchar * bytes_to_hex_string(GBytes *bytes)
G_MODULE_EXPORT gchar * fl_value_to_string(FlValue *value)
typedefG_BEGIN_DECLS struct _FlValue FlValue
FlMockRenderer * fl_mock_renderer_new(FlMockRendererGetRefreshRate get_refresh_rate)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
std::shared_ptr< const fml::Mapping > data
#define EXPECT_TRUE(handle)