#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 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 132 of file fl_key_embedder_responder_test.cc.
References TRUE.
Referenced by TEST().
|
static |
Definition at line 71 of file fl_key_embedder_responder_test.cc.
References fl_key_embedder_call_record_dispose().
|
static |
Definition at line 59 of file fl_key_embedder_responder_test.cc.
Referenced by fl_key_embedder_call_record_class_init().
|
static |
Definition at line 76 of file fl_key_embedder_responder_test.cc.
References callback, event, and user_data.
Referenced by record_calls().
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 52 of file fl_key_embedder_responder_test.cc.
|
static |
Definition at line 34 of file fl_key_embedder_responder_test.cc.
Referenced by TEST().
|
static |
Definition at line 107 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 120 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 1683 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), event, fl_key_embedder_responder_new(), fl_key_event_new(), 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 1575 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), event, fl_key_embedder_responder_new(), fl_key_event_new(), 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 969 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), event, fl_key_embedder_responder_new(), fl_key_event_new(), fl_key_responder_handle_event(), g_expected_handled, record_calls(), user_data, and verify_response_handled().
TEST | ( | FlKeyEmbedderResponderTest | , |
PressShiftDuringLetterKeyTap | |||
) |
Definition at line 269 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 515 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 138 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 1522 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), event, fl_key_embedder_responder_new(), fl_key_event_new(), 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 1320 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 1425 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 1126 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 1253 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 1001 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 606 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 761 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 360 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 912 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), fl_key_embedder_responder_new(), fl_key_event_new(), 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 234 of file fl_key_embedder_responder_test.cc.
References clear_g_call_records(), event, fl_key_embedder_responder_new(), fl_key_event_new(), 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 103 of file fl_key_embedder_responder_test.cc.
References g_expected_handled.
Referenced by TEST().
|
static |
Definition at line 100 of file fl_key_embedder_responder_test.cc.
Referenced by invoke_record_callback_and_verify(), TEST(), and verify_response_handled().
|
static |
Definition at line 101 of file fl_key_embedder_responder_test.cc.
Referenced by invoke_record_callback_and_verify().