| Flutter macOS Embedder |

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
flutter::testing::FlutterWindowControllerTest Class Reference
Inheritance diagram for flutter::testing::FlutterWindowControllerTest:

## Public Member Functions
| FlutterWindowControllerTest ()=default
void | SetUp ()
void | TearDown ()
Public Member Functions inherited from flutter::testing::FlutterEngineTest
| FlutterEngineTest ()
FlutterEngine * | GetFlutterEngine ()
void | SetUp () override
void | TearDown () override
void | AddNativeCallback (const char *name, Dart_NativeFunction function)
void | ShutDownEngine ()

## Protected Member Functions
flutter::Isolate & | isolate ()

## Protected Attributes
std::optional< flutter::Isolate > | isolate_

## Additional Inherited Members
Static Public Member Functions inherited from flutter::testing::FlutterEngineTest
static void | IsolateCreateCallback (void *user_data)

## Detailed Description

Definition at line 17 of file FlutterWindowControllerTest.mm.

## Constructor & Destructor Documentation

## ◆ FlutterWindowControllerTest()

flutter::testing::FlutterWindowControllerTest::FlutterWindowControllerTest | ( |  | ) |
| default

## Member Function Documentation

## ◆ isolate()

flutter::Isolate& flutter::testing::FlutterWindowControllerTest::isolate | ( |  | ) |
| inlineprotected

Definition at line 44 of file FlutterWindowControllerTest.mm.

44 {
45 if (isolate_) {
46 return *isolate_;
47 } else {
48 FML_LOG(ERROR) << "Isolate is not set.";
49 FML_UNREACHABLE();
50 }
51 }
flutter::testing::FlutterWindowControllerTest::isolate_
std::optional< flutter::Isolate > isolate_
Definition: FlutterWindowControllerTest.mm:53

References isolate_.

## ◆ SetUp()

void flutter::testing::FlutterWindowControllerTest::SetUp | ( |  | ) |
| inline

Definition at line 21 of file FlutterWindowControllerTest.mm.

21 {
22 FlutterEngineTest::SetUp();
23
24 [GetFlutterEngine() runWithEntrypoint:@"testWindowController"];
25
26 bool signalled = false;
27
28 AddNativeCallback("SignalNativeTest", CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) {
29 isolate_ = Isolate::Current();
30 signalled = true;
31 }));
32
33 while (!signalled) {
34 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, false);
35 }
36 }
flutter::Isolate::Current
static Isolate Current()
Definition: isolate_scope.cc:9
flutter::testing::FlutterEngineTest::AddNativeCallback
void AddNativeCallback(const char *name, Dart_NativeFunction function)
Definition: FlutterEngineTestUtils.mm:72
flutter::testing::FlutterEngineTest::SetUp
void SetUp() override
Definition: FlutterEngineTestUtils.mm:45
flutter::testing::FlutterEngineTest::GetFlutterEngine
FlutterEngine * GetFlutterEngine()
Definition: FlutterEngineTestUtils.h:22

References flutter::testing::FlutterEngineTest::AddNativeCallback(), flutter::Isolate::Current(), flutter::testing::FlutterEngineTest::GetFlutterEngine(), isolate_, and flutter::testing::FlutterEngineTest::SetUp().

## ◆ TearDown()

void flutter::testing::FlutterWindowControllerTest::TearDown | ( |  | ) |
| inline

Definition at line 38 of file FlutterWindowControllerTest.mm.

38 {
39 [GetFlutterEngine().windowController closeAllWindows];
40 FlutterEngineTest::TearDown();
41 }
flutter::testing::FlutterEngineTest::TearDown
void TearDown() override
Definition: FlutterEngineTestUtils.mm:57

References flutter::testing::FlutterEngineTest::GetFlutterEngine(), and flutter::testing::FlutterEngineTest::TearDown().

## Member Data Documentation

## ◆ isolate_

std::optional<flutter::Isolate> flutter::testing::FlutterWindowControllerTest::isolate_
| protected

Definition at line 53 of file FlutterWindowControllerTest.mm.

Referenced by isolate(), and SetUp().

The documentation for this class was generated from the following file:

- shell/platform/darwin/macos/framework/Source/FlutterWindowControllerTest.mm