#include "flutter/shell/platform/linux/fl_key_embedder_responder.h"
#include "gtest/gtest.h"
#include "flutter/shell/platform/embedder/test_utils/key_codes.g.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/testing/fl_test.h"
Go to the source code of this file.
Classes | |
struct | _FlKeyEmbedderCallRecord |
Functions | |
static void | g_ptr_array_clear (GPtrArray *array) |
G_DECLARE_FINAL_TYPE (FlKeyEmbedderCallRecord, fl_key_embedder_call_record, FL, KEY_EMBEDDER_CALL_RECORD, GObject) | |
G_DEFINE_TYPE (FlKeyEmbedderCallRecord, fl_key_embedder_call_record, G_TYPE_OBJECT) static void fl_key_embedder_call_record_init(FlKeyEmbedderCallRecord *self) | |
static void | fl_key_embedder_call_record_dispose (GObject *object) |
static void | fl_key_embedder_call_record_class_init (FlKeyEmbedderCallRecordClass *klass) |
static FlKeyEmbedderCallRecord * | fl_key_embedder_call_record_new (const FlutterKeyEvent *event, FlutterKeyEventCallback callback, gpointer user_data) |
static FlKeyEvent * | fl_key_event_new_by_mock (guint32 time_in_milliseconds, bool is_press, guint keyval, guint16 keycode, GdkModifierType state, gboolean is_modifier) |
static void | verify_response_handled (bool handled, gpointer user_data) |
static void | invoke_record_callback_and_verify (FlKeyEmbedderCallRecord *record, bool expected_handled, void *expected_user_data) |
static void | record_calls (const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *callback_user_data, void *send_key_event_user_data) |
static void | clear_g_call_records () |
TEST (FlKeyEmbedderResponderTest, SendKeyEvent) | |
TEST (FlKeyEmbedderResponderTest, UsesSpecifiedLogicalKey) | |
TEST (FlKeyEmbedderResponderTest, PressShiftDuringLetterKeyTap) | |
TEST (FlKeyEmbedderResponderTest, TapNumPadKeysBetweenNumLockEvents) | |
TEST (FlKeyEmbedderResponderTest, ReleaseShiftKeyBetweenDigitKeyEvents) | |
TEST (FlKeyEmbedderResponderTest, TapLetterKeysBetweenCapsLockEvents) | |
TEST (FlKeyEmbedderResponderTest, TapLetterKeysBetweenCapsLockEventsReversed) | |
TEST (FlKeyEmbedderResponderTest, TurnDuplicateDownEventsToRepeats) | |
TEST (FlKeyEmbedderResponderTest, IgnoreAbruptUpEvent) | |
TEST (FlKeyEmbedderResponderTest, SynthesizeForDesyncPressingStateOnSelfEvents) | |
TEST (FlKeyEmbedderResponderTest, SynthesizeForDesyncPressingStateOnNonSelfEvents) | |
TEST (FlKeyEmbedderResponderTest, SynthesizeForDesyncPressingStateOnRemappedEvents) | |
TEST (FlKeyEmbedderResponderTest, SynthesizeForDesyncLockModeOnNonSelfEvents) | |
TEST (FlKeyEmbedderResponderTest, SynthesizeForDesyncLockModeOnSelfEvents) | |
TEST (FlKeyEmbedderResponderTest, SynthesizationOccursOnIgnoredEvents) | |
TEST (FlKeyEmbedderResponderTest, HandlesShiftAltVersusGroupNext) | |
TEST (FlKeyEmbedderResponderTest, HandlesShiftAltLeftIsMetaLeft) | |
Variables | |
static gboolean | g_expected_handled |
static gpointer | g_expected_user_data |
|
static |
Definition at line 162 of file fl_key_embedder_responder_test.cc.
References TRUE.
Referenced by TEST().
|
static |
Definition at line 74 of file fl_key_embedder_responder_test.cc.
References fl_key_embedder_call_record_dispose().
|
static |
Definition at line 62 of file fl_key_embedder_responder_test.cc.
Referenced by fl_key_embedder_call_record_class_init().
|
static |
Definition at line 79 of file fl_key_embedder_responder_test.cc.
References callback, event, and user_data.
Referenced by record_calls().
|
static |
Definition at line 115 of file fl_key_embedder_responder_test.cc.
References _FlKeyEvent::is_press, and state.
Referenced by TEST().
G_DECLARE_FINAL_TYPE | ( | FlKeyEmbedderCallRecord | , |
fl_key_embedder_call_record | , | ||
FL | , | ||
KEY_EMBEDDER_CALL_RECORD | , | ||
GObject | |||
) |
G_DEFINE_TYPE | ( | FlKeyEmbedderCallRecord | , |
fl_key_embedder_call_record | , | ||
G_TYPE_OBJECT | |||
) |
Definition at line 55 of file fl_key_embedder_responder_test.cc.
|
static |
Definition at line 37 of file fl_key_embedder_responder_test.cc.
Referenced by TEST().
|
static |
Definition at line 137 of file fl_key_embedder_responder_test.cc.
References expected_handled, g_expected_handled, and g_expected_user_data.
Referenced by TEST().
|
static |
Definition at line 150 of file fl_key_embedder_responder_test.cc.
References callback, event, and fl_key_embedder_call_record_new().
Referenced by TEST().
TEST | ( | FlKeyEmbedderResponderTest | , |
HandlesShiftAltLeftIsMetaLeft | |||
) |
Definition at line 1757 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, g_ptr_array_clear(), record_calls(), send_key_event(), state, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
HandlesShiftAltVersusGroupNext | |||
) |
Definition at line 1648 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, record_calls(), send_key_event(), state, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
IgnoreAbruptUpEvent | |||
) |
Definition at line 1025 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, record_calls(), user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
PressShiftDuringLetterKeyTap | |||
) |
Definition at line 299 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
ReleaseShiftKeyBetweenDigitKeyEvents | |||
) |
Definition at line 553 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SendKeyEvent | |||
) |
Definition at line 168 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizationOccursOnIgnoredEvents | |||
) |
Definition at line 1594 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, g_ptr_array_clear(), record_calls(), state, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizeForDesyncLockModeOnNonSelfEvents | |||
) |
Definition at line 1387 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizeForDesyncLockModeOnSelfEvents | |||
) |
Definition at line 1495 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizeForDesyncPressingStateOnNonSelfEvents | |||
) |
Definition at line 1187 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizeForDesyncPressingStateOnRemappedEvents | |||
) |
Definition at line 1318 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
SynthesizeForDesyncPressingStateOnSelfEvents | |||
) |
Definition at line 1057 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), state, TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
TapLetterKeysBetweenCapsLockEvents | |||
) |
Definition at line 648 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
TapLetterKeysBetweenCapsLockEventsReversed | |||
) |
Definition at line 809 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
TapNumPadKeysBetweenNumLockEvents | |||
) |
Definition at line 392 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
TurnDuplicateDownEventsToRepeats | |||
) |
Definition at line 966 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_expected_handled, g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
UsesSpecifiedLogicalKey | |||
) |
Definition at line 264 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new_by_mock(), fl_key_responder_handle_event(), g_ptr_array_clear(), invoke_record_callback_and_verify(), record_calls(), TRUE, user_data, and verify_response_handled().
|
static |
Definition at line 133 of file fl_key_embedder_responder_test.cc.
References g_expected_handled.
Referenced by TEST().
|
static |
Definition at line 130 of file fl_key_embedder_responder_test.cc.
Referenced by invoke_record_callback_and_verify(), TEST(), and verify_response_handled().
|
static |
Definition at line 131 of file fl_key_embedder_responder_test.cc.
Referenced by invoke_record_callback_and_verify().