mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
FlutterEngineRule (JUnit TestRule) and use it in FlutterRendererTest (flutter/engine#53361)
In https://github.com/flutter/engine/pull/53280, I'm adding lifecycle-aware methods to `SurfaceProducer`. That means, in order to test that it WAI, we'll need to be running in a simulated activity, and be able to switch scenario states (i.e. to `RESUMED`). This was mentioned as well in https://github.com/flutter/flutter/issues/133151 as being something we want to do. This PR adds a `FlutterEngineRule`, which allows the creation of a "real" `FlutterEngine` and an `Intent` that can power `AndroidScenarioRule<FlutterActivity>`. I felt bad doing all of this work for a single `@Test`, so I also refactored the rest of the file and cleaned things up a bit. That said, I'm happy to revert or make changes if we liked how things were setup before.
Description
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
androidapp-frameworkcross-platformdartdart-platformdesktopflutterflutter-packagefuchsiaioslinux-desktopmacosmaterial-designmobilemobile-developmentskiawebweb-frameworkwindows
2.5 GiB
Languages
Dart
75%
C++
16.5%
Objective-C++
2.9%
Java
2.8%
Objective-C
0.7%
Other
1.9%