#include "gtest/gtest.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/fl_method_codec_private.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_event_channel.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/mock_renderer.h"
Go to the source code of this file.
Classes | |
struct | TestData |
Functions | |
static FlEngine * | make_mock_engine () |
static void | listen_channel (FlBinaryMessenger *messenger, FlValue *args) |
static void | cancel_channel (FlBinaryMessenger *messenger, FlValue *args) |
static FlMethodErrorResponse * | listen_listen_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
TEST (FlEventChannelTest, Listen) | |
static FlMethodErrorResponse * | listen_exception_listen_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
static void | listen_exception_response_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlEventChannelTest, ListenException) | |
static FlMethodErrorResponse * | cancel_cancel_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
TEST (FlEventChannelTest, Cancel) | |
static FlMethodErrorResponse * | cancel_exception_cancel_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
static void | cancel_exception_response_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlEventChannelTest, CancelException) | |
static FlMethodErrorResponse * | args_listen_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
static FlMethodErrorResponse * | args_cancel_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
TEST (FlEventChannelTest, Args) | |
static FlMethodErrorResponse * | send_events_listen_cb (FlEventChannel *channel, FlValue *args, gpointer user_data) |
static void | send_events_events_cb (FlBinaryMessenger *messenger, const gchar *channel, GBytes *message, FlBinaryMessengerResponseHandle *response_handle, gpointer user_data) |
TEST (FlEventChannelTest, Test) | |
TEST (FlEventChannelTest, ReuseChannel) | |
TEST (FlEventChannelTest, ReplaceChannel) | |
|
static |
Definition at line 281 of file fl_event_channel_test.cc.
References args, fl_value_equal(), fl_value_new_string(), and user_data.
Referenced by TEST().
|
static |
Definition at line 271 of file fl_event_channel_test.cc.
References args, fl_value_equal(), and fl_value_new_string().
Referenced by TEST().
|
static |
Definition at line 165 of file fl_event_channel_test.cc.
References args, fl_value_get_type(), FL_VALUE_TYPE_NULL, and user_data.
Referenced by TEST().
|
static |
Definition at line 53 of file fl_event_channel_test.cc.
References args, fl_method_channel_invoke_method(), fl_method_channel_new(), fl_standard_method_codec_new(), fl_value_append(), fl_value_append_take(), fl_value_new_list(), fl_value_new_null(), fl_value_new_string(), fl_value_ref(), and value.
Referenced by TEST().
|
static |
Definition at line 198 of file fl_event_channel_test.cc.
References fl_method_error_response_new().
Referenced by TEST().
|
static |
Definition at line 208 of file fl_event_channel_test.cc.
References TestData::count, error, fl_binary_messenger_send_response(), fl_method_codec_decode_response(), fl_method_error_response_get_code(), fl_method_error_response_get_message(), fl_standard_method_codec_new(), TestData::loop, and user_data.
Referenced by TEST().
|
static |
Definition at line 36 of file fl_event_channel_test.cc.
References args, fl_method_channel_invoke_method(), fl_method_channel_new(), fl_standard_method_codec_new(), fl_value_append(), fl_value_append_take(), fl_value_new_list(), fl_value_new_null(), fl_value_new_string(), fl_value_ref(), and value.
Referenced by TEST().
|
static |
Definition at line 102 of file fl_event_channel_test.cc.
References fl_method_error_response_new().
Referenced by TEST().
|
static |
Definition at line 112 of file fl_event_channel_test.cc.
References error, fl_binary_messenger_send_response(), fl_method_codec_decode_response(), fl_method_error_response_get_code(), fl_method_error_response_get_message(), fl_standard_method_codec_new(), and user_data.
Referenced by TEST().
|
static |
Definition at line 70 of file fl_event_channel_test.cc.
References args, fl_value_get_type(), FL_VALUE_TYPE_NULL, and user_data.
Referenced by TEST().
|
static |
Definition at line 24 of file fl_event_channel_test.cc.
References fl_dart_project_new(), fl_engine_new(), and fl_engine_start().
Referenced by TEST(), and test_lock_event().
|
static |
Definition at line 333 of file fl_event_channel_test.cc.
References TestData::count, error, fl_binary_messenger_send_response(), fl_method_codec_decode_response(), fl_method_response_get_result(), fl_standard_method_codec_new(), fl_value_get_int(), fl_value_get_type(), FL_VALUE_TYPE_INT, TestData::loop, result, and user_data.
Referenced by TEST().
|
static |
Definition at line 317 of file fl_event_channel_test.cc.
References error, event, fl_event_channel_send(), fl_value_new_int(), and i.
Referenced by TEST().
TEST | ( | FlEventChannelTest | , |
Args | |||
) |
Definition at line 293 of file fl_event_channel_test.cc.
References args_cancel_cb(), args_listen_cb(), cancel_channel(), fl_binary_messenger_new(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), fl_value_new_string(), listen_channel(), and make_mock_engine().
TEST | ( | FlEventChannelTest | , |
Cancel | |||
) |
Definition at line 176 of file fl_event_channel_test.cc.
References cancel_cancel_cb(), cancel_channel(), fl_binary_messenger_new(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), and make_mock_engine().
TEST | ( | FlEventChannelTest | , |
CancelException | |||
) |
Definition at line 241 of file fl_event_channel_test.cc.
References cancel_channel(), cancel_exception_cancel_cb(), cancel_exception_response_cb(), TestData::count, fl_binary_messenger_new(), fl_binary_messenger_set_message_handler_on_channel(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), TestData::loop, and make_mock_engine().
TEST | ( | FlEventChannelTest | , |
Listen | |||
) |
Definition at line 81 of file fl_event_channel_test.cc.
References fl_binary_messenger_new(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), listen_listen_cb(), and make_mock_engine().
TEST | ( | FlEventChannelTest | , |
ListenException | |||
) |
Definition at line 140 of file fl_event_channel_test.cc.
References fl_binary_messenger_new(), fl_binary_messenger_set_message_handler_on_channel(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), listen_exception_listen_cb(), listen_exception_response_cb(), and make_mock_engine().
TEST | ( | FlEventChannelTest | , |
ReplaceChannel | |||
) |
Definition at line 432 of file fl_event_channel_test.cc.
References cancel_channel(), TestData::count, fl_binary_messenger_new(), fl_binary_messenger_set_message_handler_on_channel(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), TestData::loop, make_mock_engine(), send_events_events_cb(), and send_events_listen_cb().
TEST | ( | FlEventChannelTest | , |
ReuseChannel | |||
) |
Definition at line 396 of file fl_event_channel_test.cc.
References cancel_channel(), TestData::count, fl_binary_messenger_new(), fl_binary_messenger_set_message_handler_on_channel(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), TestData::loop, make_mock_engine(), send_events_events_cb(), and send_events_listen_cb().
TEST | ( | FlEventChannelTest | , |
Test | |||
) |
Definition at line 366 of file fl_event_channel_test.cc.
References cancel_channel(), TestData::count, fl_binary_messenger_new(), fl_binary_messenger_set_message_handler_on_channel(), fl_event_channel_new(), fl_event_channel_set_stream_handlers(), fl_standard_method_codec_new(), listen_channel(), TestData::loop, make_mock_engine(), send_events_events_cb(), and send_events_listen_cb().