-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
With the new PlatformDispatcher.displays and FlutterView.display properties, flutter_test should have the same capability to mock and modify them as other properties on PlatformDispatcher and FlutterView.
- A new
TestDisplayclass will be created that allows for setting values that are read only in theDisplayimplementation similar toTestFlutterView- Setters will have the same name as the get only property, not follow the old TestWindow patterns with separate names
- When no display is available (running in headless mode), a default TestDisplay will be created with properties that match up with default values for the view that would be embedded in it.
- When one or more displays are available on the PlatformDispatcher, they will be wrapped in
TestDisplays similarly toTestFlutterViews TestFlutterView.displaywill reference the sameTestDisplayasTestPlatformDispatcher.displays[view.displayId]so that any mocked values will be in sync regardless of how they are accessed.
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.