116 id<MTLDevice> device = MTLCreateSystemDefaultDevice();
117 id<MTLCommandQueue> queue = [device newCommandQueue];
124 NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
125 styleMask:NSBorderlessWindowMask
126 backing:NSBackingStoreBuffered
131 NSView* platformView = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
133 window.contentView = view;
134 __block BOOL hitTestCalled = NO;
135 __block NSPoint hitTestCoordinate = NSZeroPoint;
136 view.onHitTest = ^NSView*(NSPoint point) {
138 hitTestCoordinate = point;
141 NSEvent* mouseEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved
142 location:NSMakePoint(100, 100)
150 [view didUpdateMouseCursor:cursor];
151 [view cursorUpdate:mouseEvent];
153 EXPECT_TRUE(hitTestCalled);
155 EXPECT_TRUE(CGPointEqualToPoint(hitTestCoordinate, CGPointMake(100, 100)));
156 EXPECT_FALSE(cursor.setCalled);