114 id<MTLDevice> device = MTLCreateSystemDefaultDevice();
115 id<MTLCommandQueue> queue = [device newCommandQueue];
121 NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
122 styleMask:NSBorderlessWindowMask
123 backing:NSBackingStoreBuffered
128 NSView* platformView = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
130 window.contentView = view;
131 __block BOOL hitTestCalled = NO;
132 __block NSPoint hitTestCoordinate = NSZeroPoint;
133 view.onHitTest = ^NSView*(NSPoint point) {
135 hitTestCoordinate = point;
138 NSEvent* mouseEvent = [NSEvent mouseEventWithType:NSEventTypeMouseMoved
139 location:NSMakePoint(100, 100)
147 [view didUpdateMouseCursor:cursor];
148 [view cursorUpdate:mouseEvent];
150 EXPECT_TRUE(hitTestCalled);
152 EXPECT_TRUE(CGPointEqualToPoint(hitTestCoordinate, CGPointMake(100, 100)));
153 EXPECT_FALSE(cursor.setCalled);