88 int64_t engineId =
reinterpret_cast<int64_t
>(
engine);
92 .size = {.width = 800, .height = 600},
93 .on_should_close = [] {},
94 .on_will_close = [] {},
95 .notify_listeners = [] {},
98 EXPECT_EQ(parentViewId, 1);
104 rect->
left = parent_rect.left + 10;
105 rect->
top = parent_rect.top + 10;
117 .parent_view_id = parentViewId,
118 .on_should_close = [] {},
119 .on_will_close = [] {},
120 .notify_listeners = [] {},
121 .on_get_window_position = position_callback,
124 const int64_t tooltipViewId =
126 EXPECT_NE(tooltipViewId, 0);
132 .size = {.width = 800, .height = 600},
133 .on_should_close = [] {},
134 .on_will_close = [] {},
135 .notify_listeners = [] {},
141 NSLog(
@"Fixtures path: %@", fixtures);
143 initWithAssetsPath:fixtures
144 ICUDataPath:[fixtures stringByAppendingString:
@"/icudtl.dat"]];
146 static std::optional<flutter::Isolate> isolate;
147 isolate = std::nullopt;
152 allowHeadlessExecution:YES];
154 [
engine runWithEntrypoint:
@"testWindowControllerRetainCycle"];
156 int64_t engineId =
reinterpret_cast<int64_t
>(
engine);
163 EXPECT_EQ(handle, 1);
166 [
engine.windowController closeAllWindows];
169 EXPECT_EQ(weakEngine, nil);
175 .size = {.width = 800, .height = 600},
176 .on_should_close = [] {},
177 .on_will_close = [] {},
178 .notify_listeners = [] {},
182 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
196 .size = {.width = 800, .height = 600},
197 .on_should_close = [] {},
198 .on_will_close = [] {},
199 .notify_listeners = [] {},
203 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
210 EXPECT_EQ(window_handle, (__bridge
void*)
viewController.view.window);
216 .size = {.width = 800, .height = 600},
217 .on_should_close = [] {},
218 .on_will_close = [] {},
219 .notify_listeners = [] {},
223 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
230 void* windowHandle = (__bridge
void*)
window;
232 EXPECT_EQ(
window.zoomed, NO);
233 EXPECT_EQ(
window.miniaturized, NO);
234 EXPECT_EQ(
window.styleMask & NSWindowStyleMaskFullScreen, 0u);
237 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
238 EXPECT_EQ(
window.zoomed, YES);
241 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
242 EXPECT_EQ(
window.zoomed, NO);
247 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
248 EXPECT_EQ(
window.miniaturized, YES);
254 .size = {.width = 800, .height = 600},
255 .on_should_close = [] {},
256 .on_will_close = [] {},
257 .notify_listeners = [] {},
260 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
273 EXPECT_NE(viewController1, nil);
274 EXPECT_NE(viewController2, nil);
275 EXPECT_NE(viewController3, nil);
278 [
engine engineCallbackOnPreEngineRestart];
281 viewController1 = [
engine viewControllerForIdentifier:handle1];
282 viewController2 = [
engine viewControllerForIdentifier:handle2];
283 viewController3 = [
engine viewControllerForIdentifier:handle3];
284 EXPECT_EQ(viewController1, nil);
285 EXPECT_EQ(viewController2, nil);
286 EXPECT_EQ(viewController3, nil);
292 int64_t engineId =
reinterpret_cast<int64_t
>(
engine);
297 .size = {.width = 800, .height = 600},
298 .on_should_close = [] {},
299 .on_will_close = [] {},
300 .notify_listeners = [] {},
302 int64_t parentViewId =
304 EXPECT_EQ(parentViewId, 1);
310 rect->
left = parent_rect.left;
311 rect->
top = parent_rect.top;
325 .parent_view_id = parentViewId,
326 .on_should_close = [] {},
327 .on_will_close = [] {},
328 .notify_listeners = [] {},
329 .on_get_window_position = position_callback,
332 const int64_t tooltipViewId =
334 EXPECT_NE(tooltipViewId, 0);
339 EXPECT_EQ(flutterView.sizedToContents, YES);
341 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1,
false);
343 [flutterView.sizingDelegate viewDidUpdateContents:flutterView withSize:NSMakeSize(1000, 1000)];
347 CGSize maxSize = flutterView.maximumContentSize;
348 EXPECT_LE(maxSize.width, 500);
349 EXPECT_LE(maxSize.height, 400);