Flutter macOS Embedder
FlutterKeyboardManagerTest.mm File Reference
#include <Carbon/Carbon.h>
#import <Foundation/Foundation.h>
#import <OCMock/OCMock.h>
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.h"
#include "flutter/shell/platform/embedder/test_utils/key_codes.g.h"
#import "flutter/testing/testing.h"
#include "third_party/googletest/googletest/include/gtest/gtest.h"

Go to the source code of this file.

Classes

class  KeyboardTester
 
class  FlutterKeyboardManagerUnittestsObjC
 

Namespaces

 flutter
 
 flutter::testing
 

Macros

#define VERIFY_DOWN(OUT_LOGICAL, OUT_CHAR)
 

Functions

 flutter::testing::TEST (FlutterKeyboardManagerUnittests, SinglePrimaryResponder)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, DoublePrimaryResponder)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, SingleFinalResponder)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, EmptyNextResponder)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, GetPressedState)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, KeyboardChannelGetPressedState)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, RacingConditionBetweenKeyAndText)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, CorrectLogicalKeyForLayouts)
 
 flutter::testing::TEST (FlutterKeyboardManagerUnittests, ShouldNotHoldStrongReferenceToViewDelegate)
 

Variables

AsyncKeyCallbackHandler _channelHandler
 
TextInputCallback _textCallback
 
NSMutableArray< NSNumber * > * _typeStorage
 
uint32_t _typeStorageMask
 
flutter::KeyboardLayoutNotifier _keyboardLayoutNotifier
 
const MockLayoutData * _currentLayout
 
id _keyboardChannelResult
 
NSObject< FlutterBinaryMessenger > * _messengerMock
 
FlutterBinaryMessageHandler _keyboardHandler
 

Macro Definition Documentation

◆ VERIFY_DOWN

#define VERIFY_DOWN (   OUT_LOGICAL,
  OUT_CHAR 
)
Value:
EXPECT_EQ(events[0].type, kFlutterKeyEventTypeDown); \
EXPECT_EQ(events[0].logical, static_cast<uint64_t>(OUT_LOGICAL)); \
EXPECT_STREQ(events[0].character, (OUT_CHAR)); \
clearEvents(events);

Definition at line 172 of file FlutterKeyboardManagerTest.mm.

Variable Documentation

◆ _channelHandler

AsyncKeyCallbackHandler _channelHandler
Initial value:
{
AsyncEmbedderCallbackHandler _embedderHandler

Definition at line 235 of file FlutterKeyboardManagerTest.mm.

Referenced by KeyboardTester::handleChannelMessage:message:binaryReply:, KeyboardTester::recordChannelCallsTo:, and KeyboardTester::respondChannelCallsWith:.

◆ _currentLayout

const MockLayoutData* _currentLayout

Definition at line 244 of file FlutterKeyboardManagerTest.mm.

Referenced by KeyboardTester::init.

◆ _keyboardChannelResult

id _keyboardChannelResult

◆ _keyboardHandler

FlutterBinaryMessageHandler _keyboardHandler

Definition at line 248 of file FlutterKeyboardManagerTest.mm.

◆ _keyboardLayoutNotifier

flutter::KeyboardLayoutNotifier _keyboardLayoutNotifier

Definition at line 243 of file FlutterKeyboardManagerTest.mm.

◆ _messengerMock

NSObject<FlutterBinaryMessenger>* _messengerMock

Definition at line 247 of file FlutterKeyboardManagerTest.mm.

Referenced by KeyboardTester::init.

◆ _textCallback

TextInputCallback _textCallback

◆ _typeStorage

◆ _typeStorageMask