#include "gtest/gtest.h"
#include "flutter/shell/platform/linux/fl_method_codec_private.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_mock_binary_messenger.h"
Go to the source code of this file.
Functions | |
TEST (FlMethodChannelTest, InvokeMethod) | |
TEST (FlMethodChannelTest, InvokeMethodNullptrArgsMessage) | |
TEST (FlMethodChannelTest, InvokeMethodError) | |
TEST (FlMethodChannelTest, InvokeMethodNotImplemented) | |
TEST (FlMethodChannelTest, InvokeMethodFailure) | |
TEST (FlMethodChannelTest, ReceiveMethodCallRespondSuccess) | |
TEST (FlMethodChannelTest, ReceiveMethodCallRespondError) | |
TEST (FlMethodChannelTest, ReceiveMethodCallRespondNotImplemented) | |
G_DECLARE_FINAL_TYPE (TestMethodCodec, test_method_codec, TEST, METHOD_CODEC, FlMethodCodec) struct _TestMethodCodec | |
static void | test_method_codec_dispose (GObject *object) |
static GBytes * | test_method_codec_encode_method_call (FlMethodCodec *codec, const gchar *name, FlValue *args, GError **error) |
static gboolean | test_method_codec_decode_method_call (FlMethodCodec *codec, GBytes *message, gchar **name, FlValue **args, GError **error) |
static GBytes * | test_method_codec_encode_success_envelope (FlMethodCodec *codec, FlValue *result, GError **error) |
static GBytes * | test_method_codec_encode_error_envelope (FlMethodCodec *codec, const gchar *code, const gchar *message, FlValue *details, GError **error) |
static FlMethodResponse * | test_method_codec_decode_response (FlMethodCodec *codec, GBytes *message, GError **error) |
static void | test_method_codec_class_init (TestMethodCodecClass *klass) |
static void | test_method_codec_init (TestMethodCodec *self) |
TestMethodCodec * | test_method_codec_new () |
TEST (FlMethodChannelTest, ReceiveMethodCallRespondSuccessError) | |
TEST (FlMethodChannelTest, ReceiveMethodCallRespondErrorError) | |
TEST (FlMethodChannelTest, ReplaceADisposedMethodChannel) | |
TEST (FlMethodChannelTest, DisposeAReplacedMethodChannel) | |
TEST (FlMethodChannelTest, CustomType) | |
G_DECLARE_FINAL_TYPE | ( | TestMethodCodec | , |
test_method_codec | , | ||
TEST | , | ||
METHOD_CODEC | , | ||
FlMethodCodec | |||
) |
Definition at line 355 of file fl_method_channel_test.cc.
TEST | ( | FlMethodChannelTest | , |
CustomType | |||
) |
Definition at line 657 of file fl_method_channel_test.cc.
References args, error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_method_success_response_new(), fl_standard_method_codec_new(), fl_value_new_custom(), and user_data.
TEST | ( | FlMethodChannelTest | , |
DisposeAReplacedMethodChannel | |||
) |
Definition at line 592 of file fl_method_channel_test.cc.
References fl_method_call_respond_success(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), method_call, and user_data.
TEST | ( | FlMethodChannelTest | , |
InvokeMethod | |||
) |
Definition at line 14 of file fl_method_channel_test.cc.
References args, error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_method_response_get_result(), fl_method_success_response_new(), fl_standard_method_codec_new(), fl_value_get_string(), fl_value_get_type(), fl_value_new_string(), FL_VALUE_TYPE_STRING, and user_data.
TEST | ( | FlMethodChannelTest | , |
InvokeMethodError | |||
) |
Definition at line 101 of file fl_method_channel_test.cc.
References args, error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_method_error_response_get_code(), fl_method_error_response_get_details(), fl_method_error_response_get_message(), fl_method_error_response_new(), fl_standard_method_codec_new(), fl_value_get_string(), fl_value_get_type(), fl_value_new_string(), FL_VALUE_TYPE_STRING, and user_data.
TEST | ( | FlMethodChannelTest | , |
InvokeMethodFailure | |||
) |
Definition at line 188 of file fl_method_channel_test.cc.
References error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_standard_method_codec_new(), and user_data.
TEST | ( | FlMethodChannelTest | , |
InvokeMethodNotImplemented | |||
) |
Definition at line 151 of file fl_method_channel_test.cc.
References args, error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_method_not_implemented_response_new(), fl_standard_method_codec_new(), and user_data.
TEST | ( | FlMethodChannelTest | , |
InvokeMethodNullptrArgsMessage | |||
) |
Definition at line 60 of file fl_method_channel_test.cc.
References args, error, fl_method_channel_invoke_method(), fl_method_channel_invoke_method_finish(), fl_method_channel_new(), fl_method_response_get_result(), fl_method_success_response_new(), fl_standard_method_codec_new(), fl_value_get_type(), FL_VALUE_TYPE_NULL, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReceiveMethodCallRespondError | |||
) |
Definition at line 264 of file fl_method_channel_test.cc.
References args, error, fl_method_call_get_args(), fl_method_call_get_name(), fl_method_call_respond_error(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_method_error_response_get_code(), fl_method_error_response_get_details(), fl_method_error_response_get_message(), fl_standard_method_codec_new(), fl_value_get_string(), fl_value_get_type(), fl_value_new_string(), FL_VALUE_TYPE_STRING, method_call, TRUE, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReceiveMethodCallRespondErrorError | |||
) |
Definition at line 492 of file fl_method_channel_test.cc.
References fl_method_call_respond_error(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_value_new_int(), method_call, test_method_codec_new(), TRUE, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReceiveMethodCallRespondNotImplemented | |||
) |
Definition at line 315 of file fl_method_channel_test.cc.
References args, error, fl_method_call_get_args(), fl_method_call_get_name(), fl_method_call_respond_not_implemented(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), fl_value_get_string(), fl_value_get_type(), fl_value_new_string(), FL_VALUE_TYPE_STRING, method_call, TRUE, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReceiveMethodCallRespondSuccess | |||
) |
Definition at line 219 of file fl_method_channel_test.cc.
References args, error, fl_method_call_get_args(), fl_method_call_get_name(), fl_method_call_respond_success(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_method_success_response_get_result(), fl_standard_method_codec_new(), fl_value_get_string(), fl_value_get_type(), fl_value_new_string(), FL_VALUE_TYPE_STRING, method_call, TRUE, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReceiveMethodCallRespondSuccessError | |||
) |
Definition at line 454 of file fl_method_channel_test.cc.
References fl_method_call_respond_not_implemented(), fl_method_call_respond_success(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_value_new_int(), method_call, test_method_codec_new(), TRUE, and user_data.
TEST | ( | FlMethodChannelTest | , |
ReplaceADisposedMethodChannel | |||
) |
Definition at line 529 of file fl_method_channel_test.cc.
References fl_method_call_respond_success(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), method_call, and user_data.
|
static |
Definition at line 430 of file fl_method_channel_test.cc.
References test_method_codec_decode_method_call(), test_method_codec_decode_response(), test_method_codec_dispose(), test_method_codec_encode_error_envelope(), test_method_codec_encode_method_call(), and test_method_codec_encode_success_envelope().
|
static |
Definition at line 389 of file fl_method_channel_test.cc.
References args, error, and fl_method_codec_decode_method_call().
Referenced by test_method_codec_class_init().
|
static |
Definition at line 421 of file fl_method_channel_test.cc.
References error, and fl_method_codec_decode_response().
Referenced by test_method_codec_class_init().
|
static |
Definition at line 369 of file fl_method_channel_test.cc.
Referenced by test_method_codec_class_init().
|
static |
Definition at line 410 of file fl_method_channel_test.cc.
References error, FL_MESSAGE_CODEC_ERROR, and FL_MESSAGE_CODEC_ERROR_FAILED.
Referenced by test_method_codec_class_init().
|
static |
Definition at line 378 of file fl_method_channel_test.cc.
References args, error, and fl_method_codec_encode_method_call().
Referenced by test_method_codec_class_init().
|
static |
Definition at line 401 of file fl_method_channel_test.cc.
References error, FL_MESSAGE_CODEC_ERROR, and FL_MESSAGE_CODEC_ERROR_FAILED.
Referenced by test_method_codec_class_init().
|
static |
Definition at line 444 of file fl_method_channel_test.cc.
References fl_standard_method_codec_new().
TestMethodCodec* test_method_codec_new | ( | ) |
Definition at line 448 of file fl_method_channel_test.cc.
Referenced by TEST().