12 #import "flutter/testing/testing.h"
19 NSString* fixtures = @(testing::GetFixturesPath());
21 initWithAssetsPath:fixtures
22 ICUDataPath:[fixtures stringByAppendingString:
@"/icudtl.dat"]];
23 return [[
FlutterEngine alloc] initWithName:
@"test" project:project allowHeadlessExecution:
true];
27 TEST(FlutterTextInputSemanticsObjectTest, DoesInitialize) {
33 [viewController loadView];
35 NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
36 styleMask:NSBorderlessWindowMask
37 backing:NSBackingStoreBuffered
39 window.contentView = viewController.view;
41 engine.semanticsEnabled = YES;
43 auto bridge = viewController.accessibilityBridge.lock();
46 ui::AXNode ax_node(&tree,
nullptr, 0, 0);
47 ui::AXNodeData node_data;
48 node_data.SetValue(
"initial text");
49 ax_node.SetData(node_data);
50 delegate.
Init(viewController.accessibilityBridge, &ax_node);
55 auto subviews = [viewController.view subviews];
56 EXPECT_EQ([subviews count], 2u);
62 [engine shutDownEngine];
67 [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];