5#include <Carbon/Carbon.h>
6#import <Foundation/Foundation.h>
7#import <OCMock/OCMock.h>
9#include "flutter/common/constants.h"
10#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
11#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
12#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h"
13#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewEngineProvider.h"
14#import "flutter/testing/testing.h"
15#include "third_party/googletest/googletest/include/gtest/gtest.h"
19TEST(FlutterViewEngineProviderUnittests, GetViewReturnsTheCorrectView) {
22 __block
id mockFlutterViewController;
23 OCMStub([mockEngine viewControllerForIdentifier:0])
24 .ignoringNonObjectArgs()
25 .andDo(^(NSInvocation* invocation) {
27 [invocation getArgument:&viewIdentifier atIndex:2];
29 if (mockFlutterViewController != nil) {
30 [invocation setReturnValue:&mockFlutterViewController];
37 EXPECT_EQ([viewProvider viewForIdentifier:0], nil);
41 id mockView = OCMStrictClassMock([
FlutterView class]);
42 OCMStub([mockFlutterViewController flutterView]).andReturn(mockView);
43 EXPECT_EQ([viewProvider viewForIdentifier:0], mockView);
id CreateMockFlutterEngine(NSString *pasteboardString)
TEST(DisplayListComplexity, EmptyDisplayList)
constexpr int64_t kFlutterImplicitViewId