324 {
325 id bundleMock = OCMPartialMock([NSBundle mainBundle]);
326 OCMStub([bundleMock objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"])
327 .andReturn(@YES);
328 {
329
334 std::unique_ptr<fml::WeakNSObjectFactory<FlutterEngine>>
_weakFactory =
335 std::make_unique<fml::WeakNSObjectFactory<FlutterEngine>>(
engine);
337
338
340
341 XCTestExpectation* enableSystemUIOverlaysCalled =
342 [self expectationWithDescription:@"setEnabledSystemUIOverlays"];
344 [enableSystemUIOverlaysCalled fulfill];
345 };
348 arguments:@[ @"SystemUiOverlay.bottom" ]];
350 [self waitForExpectationsWithTimeout:1 handler:nil];
352
353
354 XCTestExpectation* enableSystemUIOverlaysCalled2 =
355 [self expectationWithDescription:@"setEnabledSystemUIOverlays"];
357 [enableSystemUIOverlaysCalled2 fulfill];
358 };
363 [self waitForExpectationsWithTimeout:1 handler:nil];
365
367 }
368 {
369
374 std::unique_ptr<fml::WeakNSObjectFactory<FlutterEngine>>
_weakFactory =
375 std::make_unique<fml::WeakNSObjectFactory<FlutterEngine>>(
engine);
377
378
380
381 XCTestExpectation* enableSystemUIModeCalled =
382 [self expectationWithDescription:@"setEnabledSystemUIMode"];
384 [enableSystemUIModeCalled fulfill];
385 };
390 [self waitForExpectationsWithTimeout:1 handler:nil];
392
393
394 XCTestExpectation* enableSystemUIModeCalled2 =
395 [self expectationWithDescription:@"setEnabledSystemUIMode"];
397 [enableSystemUIModeCalled2 fulfill];
398 };
403 [self waitForExpectationsWithTimeout:1 handler:nil];
405
407 }
408 [bundleMock stopMocking];
409}