Flutter Engine
The Flutter Engine
|
#include "gtest/gtest.h"
#include <pthread.h>
#include <cstring>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/embedder/test_utils/proc_table_replacement.h"
#include "flutter/shell/platform/linux/fl_binary_messenger_private.h"
#include "flutter/shell/platform/linux/fl_engine_private.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_method_codec.h"
#include "flutter/shell/platform/linux/testing/fl_test.h"
#include "flutter/shell/platform/linux/testing/mock_binary_messenger_response_handle.h"
#include "flutter/shell/platform/linux/testing/mock_renderer.h"
Go to the source code of this file.
Classes | |
struct | RespondsOnBackgroundThreadInfo |
Functions | |
G_DECLARE_FINAL_TYPE (FlFakeBinaryMessenger, fl_fake_binary_messenger, FL, FAKE_BINARY_MESSENGER, GObject) struct _FlFakeBinaryMessenger | |
static void | fl_fake_binary_messenger_iface_init (FlBinaryMessengerInterface *iface) |
G_DEFINE_TYPE_WITH_CODE (FlFakeBinaryMessenger, fl_fake_binary_messenger, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(fl_binary_messenger_get_type(), fl_fake_binary_messenger_iface_init)) static void fl_fake_binary_messenger_class_init(FlFakeBinaryMessengerClass *klass) | |
static gboolean | send_message_cb (gpointer user_data) |
static void | set_message_handler_on_channel (FlBinaryMessenger *messenger, const gchar *channel, FlBinaryMessengerMessageHandler handler, gpointer user_data, GDestroyNotify destroy_notify) |
static gboolean | send_response (FlBinaryMessenger *messenger, FlBinaryMessengerResponseHandle *response_handle, GBytes *response, GError **error) |
static gboolean | send_ready_cb (gpointer user_data) |
static void | send_on_channel (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
static GBytes * | send_on_channel_finish (FlBinaryMessenger *messenger, GAsyncResult *result, GError **error) |
static void | resize_channel (FlBinaryMessenger *messenger, const gchar *channel, int64_t new_size) |
static void | set_warns_on_channel_overflow (FlBinaryMessenger *messenger, const gchar *channel, bool warns) |
static void | fl_fake_binary_messenger_init (FlFakeBinaryMessenger *self) |
static FlBinaryMessenger * | fl_fake_binary_messenger_new (GMainLoop *loop) |
static void | fake_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
TEST (FlBinaryMessengerTest, FakeMessengerSend) | |
static void | fake_message_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlBinaryMessengerTest, FakeMessengerReceive) | |
TEST (FlBinaryMessengerTest, SendNullptrMessage) | |
TEST (FlBinaryMessengerTest, SendEmptyMessage) | |
static void | echo_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
TEST (FlBinaryMessengerTest, SendMessage) | |
static void | nullptr_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
TEST (FlBinaryMessengerTest, NullptrResponse) | |
static void | failure_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
TEST (FlBinaryMessengerTest, SendFailure) | |
static void | message_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
static void | response_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlBinaryMessengerTest, ReceiveMessage) | |
TEST (FlBinaryMessengerTest, ResizeChannel) | |
TEST (FlBinaryMessengerTest, WarnsOnOverflowChannel) | |
static gboolean | quit_main_loop_cb (gpointer user_data) |
TEST (FlBinaryMessengerTest, ControlChannelErrorResponse) | |
static gboolean | cleanup_responds_on_background_thread_info (gpointer user_data) |
static void * | response_from_thread_main (void *user_data) |
static void | response_from_thread_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlBinaryMessengerTest, RespondOnBackgroundThread) | |
static void | kill_handler_notify_cb (gpointer was_called) |
TEST (FlBinaryMessengerTest, DeletingEngineClearsHandlers) | |
|
static |
|
static |
Definition at line 253 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 317 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 199 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 165 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 145 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 155 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 157 of file fl_binary_messenger_test.cc.
G_DECLARE_FINAL_TYPE | ( | FlFakeBinaryMessenger | , |
fl_fake_binary_messenger | , | ||
FL | , | ||
FAKE_BINARY_MESSENGER | , | ||
GObject | |||
) |
Definition at line 22 of file fl_binary_messenger_test.cc.
G_DEFINE_TYPE_WITH_CODE | ( | FlFakeBinaryMessenger | , |
fl_fake_binary_messenger | , | ||
G_TYPE_OBJECT | , | ||
G_IMPLEMENT_INTERFACE(fl_binary_messenger_get_type(), fl_fake_binary_messenger_iface_init) | |||
) |
Definition at line 41 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 631 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 343 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 286 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 504 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 133 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 365 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 588 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 576 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 51 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 106 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 126 of file fl_binary_messenger_test.cc.
|
static |
|
static |
Definition at line 80 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 64 of file fl_binary_messenger_test.cc.
|
static |
Definition at line 139 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
ControlChannelErrorResponse | |||
) |
Definition at line 511 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
DeletingEngineClearsHandlers | |||
) |
Definition at line 635 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
FakeMessengerReceive | |||
) |
Definition at line 222 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
FakeMessengerSend | |||
) |
Definition at line 183 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
NullptrResponse | |||
) |
Definition at line 301 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
ReceiveMessage | |||
) |
Definition at line 383 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
ResizeChannel | |||
) |
Definition at line 411 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
RespondOnBackgroundThread | |||
) |
Definition at line 607 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
SendEmptyMessage | |||
) |
Definition at line 244 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
SendFailure | |||
) |
Definition at line 330 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
SendMessage | |||
) |
Definition at line 271 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
SendNullptrMessage | |||
) |
Definition at line 236 of file fl_binary_messenger_test.cc.
TEST | ( | FlBinaryMessengerTest | , |
WarnsOnOverflowChannel | |||
) |
Definition at line 458 of file fl_binary_messenger_test.cc.