Matan Lurey 5300aafdb5 Add a 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.
2024-06-13 16:22:54 -07:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%