118 id<MTLDevice> device = MTLCreateSystemDefaultDevice();
119 id<MTLCommandQueue> queue = [device newCommandQueue];
125 threadSynchronizer:threadSynchronizer
127 NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
128 styleMask:NSBorderlessWindowMask
129 backing:NSBackingStoreBuffered
134 NSView* platformView = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
136 window.contentView = view;
137 __block BOOL hitTestCalled = NO;
138 __block NSPoint hitTestCoordinate = NSZeroPoint;
139 view.onHitTest = ^NSView*(NSPoint point) {
141 hitTestCoordinate = point;
144 NSEvent* mouseEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved
145 location:NSMakePoint(100, 100)
153 [view didUpdateMouseCursor:cursor];
154 [view cursorUpdate:mouseEvent];
156 EXPECT_TRUE(hitTestCalled);
158 EXPECT_TRUE(CGPointEqualToPoint(hitTestCoordinate, CGPointMake(100, 100)));
159 EXPECT_FALSE(cursor.setCalled);