Flutter Engine
keyboard_unittests.cc File Reference
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/embedder/test_utils/key_codes.h"
#include "flutter/shell/platform/windows/flutter_windows_engine.h"
#include "flutter/shell/platform/windows/keyboard_key_channel_handler.h"
#include "flutter/shell/platform/windows/keyboard_key_embedder_handler.h"
#include "flutter/shell/platform/windows/keyboard_key_handler.h"
#include "flutter/shell/platform/windows/testing/engine_modifier.h"
#include "flutter/shell/platform/windows/testing/flutter_window_win32_test.h"
#include "flutter/shell/platform/windows/testing/mock_window_binding_handler.h"
#include "flutter/shell/platform/windows/testing/test_keyboard.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <functional>
#include <vector>

Go to the source code of this file.

Namespaces

 flutter
 
 flutter::testing
 

Macros

#define EXPECT_CALL_IS_EVENT(_key_call, ...)
 
#define EXPECT_CALL_IS_TEXT(_key_call, u16_string)
 

Enumerations

enum  flutter::testing::@1411::KeyCallType
 

Functions

 flutter::testing::TEST (KeyboardTest, LowerCaseAHandled)
 
 flutter::testing::TEST (KeyboardTest, LowerCaseAUnhandled)
 
 flutter::testing::TEST (KeyboardTest, ShiftLeftKeyA)
 
 flutter::testing::TEST (KeyboardTest, CtrlLeftKeyA)
 
 flutter::testing::TEST (KeyboardTest, CtrlLeftDigit1)
 
 flutter::testing::TEST (KeyboardTest, Digit1OnFrenchLayout)
 
 flutter::testing::TEST (KeyboardTest, AltGrModifiedKey)
 
 flutter::testing::TEST (KeyboardTest, DeadKeyThatCombines)
 
 flutter::testing::TEST (KeyboardTest, DeadKeyThatDoesNotCombine)
 
 flutter::testing::TEST (KeyboardTest, MultibyteCharacter)
 

Macro Definition Documentation

◆ EXPECT_CALL_IS_EVENT

#define EXPECT_CALL_IS_EVENT (   _key_call,
  ... 
)
Value:
EXPECT_EQ(_key_call.type, kKeyCallOnKey); \
EXPECT_EVENT_EQUALS(_key_call.key_event, __VA_ARGS__);

Definition at line 374 of file keyboard_unittests.cc.

Referenced by flutter::testing::TEST().

◆ EXPECT_CALL_IS_TEXT

#define EXPECT_CALL_IS_TEXT (   _key_call,
  u16_string 
)
Value:
EXPECT_EQ(_key_call.type, kKeyCallOnText); \
EXPECT_EQ(_key_call.text, u16_string);

Definition at line 378 of file keyboard_unittests.cc.

Referenced by flutter::testing::TEST().

Enumeration Type Documentation

◆ KeyCallType

enum flutter::testing::@1411::KeyCallType

Definition at line 234 of file keyboard_unittests.cc.

234  {
235  kKeyCallOnKey,
236  kKeyCallOnText,
237 } KeyCallType;

Variable Documentation

◆ cbSize

int cbSize

Definition at line 162 of file keyboard_unittests.cc.

Referenced by flutter::testing::TEST().

◆ cInputs

UINT cInputs

Definition at line 160 of file keyboard_unittests.cc.

Referenced by flutter::testing::TEST().

◆ kbdinput

KEYBDINPUT kbdinput

Definition at line 161 of file keyboard_unittests.cc.

◆ key_event

FlutterKeyEvent key_event

Definition at line 243 of file keyboard_unittests.cc.

◆ redispatch_char

uint32_t redispatch_char

Definition at line 176 of file keyboard_unittests.cc.

◆ test_response

bool test_response
static

Definition at line 307 of file keyboard_unittests.cc.

Referenced by flutter::testing::TEST().

◆ text

std::u16string text

Definition at line 244 of file keyboard_unittests.cc.

Referenced by flutter::TextInputManagerWin32::AbortComposing(), BENCHMARK_DEFINE_F(), txt::BENCHMARK_DEFINE_F(), BENCHMARK_F(), txt::BENCHMARK_F(), txt::BM_ParagraphBuilderAddTextChar(), txt::BM_ParagraphBuilderAddTextString(), txt::BM_ParagraphBuilderAddTextU16stringLong(), txt::BM_ParagraphBuilderAddTextU16stringShort(), txt::BM_ParagraphBuilderLongParagraphConstruct(), txt::BM_ParagraphBuilderShortParagraphConstruct(), flutter::TextInputPlugin::ComposeChangeHook(), AXPlatformNodeCocoa::detach, flutter::testing::MockCanvas::didRestore(), echo_response_cb(), fl_json_message_codec_encode_message(), fl_standard_message_codec_write_value(), fl_string_codec_encode_message(), fl_test_codec_encode_error_envelope(), fl_test_codec_encode_method_call(), fl_test_codec_encode_success_envelope(), ui::AXPlatformNode::GetAccessibilityMode(), flutter::FlutterPlatformNodeDelegateMac::GetLiveRegionText(), ui::AXNode::GetOrComputeLineStartOffsets(), ui::AXNodePosition::GetText(), flutter_runner::PlatformView::HandleAccessibilityChannelPlatformMessage(), flutter_runner::PlatformView::HandleFlutterTextInputChannelPlatformMessage(), flutter::WindowWin32::HandleMessage(), im_retrieve_surrounding_cb(), FlutterTextInputPlugin::isFirstResponder, flutter::FlutterWindowWinUWP::IsVisible(), flutter::PerformanceOverlayLayer::MakeStatisticsText(), message_cb(), mock_message_cb(), mock_response_cb(), ui::AXPlatformNodeBase::NotifyAccessibilityEvent(), flutter::WindowWin32::OnImeComposition(), FlutterViewController::onPreEngineRestart, response_cb(), send_message_cb(), send_on_channel(), send_on_channel_finish(), send_response(), flutter::FlutterWindowsView::SendInitialBounds(), set_editing_state(), flutter::testing::TEST(), TEST(), txt::TEST_F(), flutter::TextInputPlugin::TextInputPlugin(), ui::AXPosition< AXNodePosition, AXNode >::ToString(), and flutter::TextInputModel::UpdateComposingText().

◆ type

KeyCallType type

Definition at line 240 of file keyboard_unittests.cc.

Referenced by base::internal::SaturateFastAsmOp< Dst, Src >::__attribute__(), flutter::TextInputManagerWin32::AbortComposing(), ui::AXPosition< AXNodePosition, AXNode >::AtEndOfParagraph(), ui::AXPosition< AXNodePosition, AXNode >::AtStartOfParagraph(), ui::AXTreeObserver::Change::Change(), base::internal::CheckedAddImpl(), base::internal::CheckedMulImpl(), base::internal::CheckedSubImpl(), DartVMInitializer::Cleanup(), base::internal::ConditionalNegate(), tonic::DartWrappable::CreateDartWrapper(), ui::AXPosition< AXNodePosition, AXNode >::CreateNextLeafTextPosition(), tonic::DartByteData::DartByteData(), FlutterEngine::destroyContext, flutter::DidFlagChange(), base::internal::CheckedAddOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::CheckedSubOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), fml::MessageLoopImpl::DoTerminate(), fl_key_channel_responder_handle_event(), fl_key_event_new_from_gdk_event(), fl_keyboard_manager_get_event_hash(), fl_standard_message_codec_read_value(), fl_standard_method_codec_decode_response(), fl_standard_method_codec_encode_error_envelope(), fl_standard_method_codec_encode_success_envelope(), FlutterEnginePostCallbackOnAllNativeThreads(), FlutterEngineSendKeyEvent(), flutter::Shell::GetDartVM(), flutter::testing::EmbedderTest::GetEmbedderContext(), flutter_runner::PlatformView::HandleAccessibilityChannelPlatformMessage(), ui::AXPlatformRelationWin::Initialize(), FlutterChannelKeyResponder::initWithChannel:, FakeUIPressProxy::initWithData:key:type:timestamp:, FlutterUIPressProxy::initWithPress:withEvent:, minikin::HyphenEdit::isInsertion(), flutter::KeyboardKeyEmbedderHandler::KeyboardHook(), tonic::LookupNonNullableType(), ui::AXPosition< AXNodePosition, AXNode >::MaxTextOffsetInParent(), base::internal::NegateWrapper(), flutter::normalizeScancode(), flutter_runner::PlatformView::OnKeyEvent(), flutter::CustomEncodableValue::operator const std::any &(), flutter::EmbedderEngine::PostTaskOnEngineManagedNativeThreads(), flutter::Rasterize(), FlutterStandardReader::readAlignment:, flutter::StandardCodecSerializer::ReadValue(), flutter::StandardCodecSerializer::ReadValueOfType(), FlutterStandardReader::readValueOfType:, redispatch_key_event_by_gtk(), flutter::PlatformConfiguration::ReportTimings(), FlutterEngine::run, base::internal::SafeCompare(), base::internal::SafeUnsignedAbs(), flutter::testing::EmbedderConfigBuilder::SetRenderTargetType(), tonic::DartConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::SetReturnValue(), synchronize_lock_states_loop_body(), synthesize_simple_event(), system_sound_play(), flutter::testing::TEST_F(), text_input_im_filter_by_gtk(), tonic::DartConverter< TypedList< kTypeName, ElemType > >::ToDart(), tonic::DartConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::ToDart(), ui::AXTreeID::token(), ui::AXNodeData::ToString(), FlutterStandardTypedData::typedDataWithFloat64:, tonic::TypedList< kTypeName, ElemType >::TypedList(), and flutter::AssetManager::UpdateResolverByType().