Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions | Variables
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

namespace  flutter
 
namespace  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);
GLenum type
@ kFlutterKeyEventTypeDown
Definition: embedder.h:1076

Definition at line 172 of file FlutterKeyboardManagerTest.mm.

Variable Documentation

◆ _channelHandler

AsyncKeyCallbackHandler _channelHandler
Initial value:
{
AsyncEmbedderCallbackHandler _embedderHandler

Definition at line 237 of file FlutterKeyboardManagerTest.mm.

◆ _currentLayout

const MockLayoutData* _currentLayout

Definition at line 244 of file FlutterKeyboardManagerTest.mm.

◆ _keyboardChannelResult

id _keyboardChannelResult

Definition at line 246 of file FlutterKeyboardManagerTest.mm.

◆ _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.

◆ _textCallback

TextInputCallback _textCallback

Definition at line 238 of file FlutterKeyboardManagerTest.mm.

◆ _typeStorage

NSMutableArray<NSNumber*>* _typeStorage

Definition at line 240 of file FlutterKeyboardManagerTest.mm.

◆ _typeStorageMask

uint32_t _typeStorageMask

Definition at line 241 of file FlutterKeyboardManagerTest.mm.