13#import "third_party/googletest/googletest/include/gtest/gtest.h"
26 bool signalled =
false;
34 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1,
false);
48 FML_LOG(ERROR) <<
"Isolate is not set.";
61 .size = {.width = 800, .height = 600},
63 .notify_listeners = [] {},
67 int64_t engineId =
reinterpret_cast<int64_t
>(
engine);
77 EXPECT_EQ(
size.width, 800);
78 EXPECT_EQ(
size.height, 600);
85 .size = {.width = 800, .height = 600},
87 .notify_listeners = [] {},
93 NSLog(
@"Fixtures path: %@", fixtures);
95 initWithAssetsPath:fixtures
96 ICUDataPath:[fixtures stringByAppendingString:
@"/icudtl.dat"]];
98 static std::optional<flutter::Isolate> isolate;
99 isolate = std::nullopt;
104 allowHeadlessExecution:YES];
106 [
engine runWithEntrypoint:
@"testWindowControllerRetainCycle"];
108 int64_t engineId =
reinterpret_cast<int64_t
>(
engine);
115 EXPECT_EQ(handle, 1);
118 [
engine.windowController closeAllWindows];
121 EXPECT_EQ(weakEngine, nil);
127 .size = {.width = 800, .height = 600},
129 .notify_listeners = [] {},
133 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
147 .size = {.width = 800, .height = 600},
149 .notify_listeners = [] {},
153 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
160 EXPECT_EQ(window_handle, (__bridge
void*)
viewController.view.window);
166 .size = {.width = 800, .height = 600},
168 .notify_listeners = [] {},
172 int64_t engine_id =
reinterpret_cast<int64_t
>(
engine);
179 void* windowHandle = (__bridge
void*)
window;
181 EXPECT_EQ(
window.zoomed, NO);
182 EXPECT_EQ(
window.miniaturized, NO);
183 EXPECT_EQ(
window.styleMask & NSWindowStyleMaskFullScreen, 0u);
186 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
187 EXPECT_EQ(
window.zoomed, YES);
190 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
191 EXPECT_EQ(
window.zoomed, NO);
196 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5,
false);
197 EXPECT_EQ(
window.miniaturized, YES);
FLUTTER_DARWIN_EXPORT int64_t InternalFlutter_WindowController_CreateRegularWindow(int64_t engine_id, const FlutterWindowCreationRequest *request)
FLUTTER_DARWIN_EXPORT void * InternalFlutter_Window_GetHandle(int64_t engine_id, FlutterViewIdentifier view_id)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetMaximized(void *window, bool maximized)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Destroy(int64_t engine_id, void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Minimize(void *window)
FlutterEngine * GetFlutterEngine()
void AddNativeCallback(const char *name, Dart_NativeFunction function)
std::optional< flutter::Isolate > isolate_
FlutterWindowControllerTest()=default
flutter::Isolate & isolate()
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_LOG(severity)
#define FML_UNREACHABLE()
#define FML_DCHECK(condition)
void(* rootIsolateCreateCallback)(void *_Nullable)
FlutterViewController * viewController
TEST_F(DisplayListTest, Defaults)
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
#define CREATE_NATIVE_ENTRY(native_entry)