Unverified Commit 399cd6a5 authored by pdblasi-google's avatar pdblasi-google Committed by GitHub

Refactors accessibility guidelines to remove the single window assumption. (#122760)

Refactors accessibility guidelines to remove the single window assumption
parent 3dd3c021
...@@ -252,19 +252,17 @@ abstract class WidgetController { ...@@ -252,19 +252,17 @@ abstract class WidgetController {
/// The [TestFlutterView] provided by default when testing with /// The [TestFlutterView] provided by default when testing with
/// [WidgetTester.pumpWidget]. /// [WidgetTester.pumpWidget].
/// ///
/// If the test requires multiple views, it will need to use [viewOf] instead /// If the test uses multiple views, this will return the view that is painted
/// to ensure that the view related to the widget being evaluated is the one /// into by [WidgetTester.pumpWidget]. If a different view needs to be
/// that gets updated. /// accessed use [viewOf] to ensure that the view related to the widget being
/// evaluated is the one that gets updated.
/// ///
/// See also: /// See also:
/// ///
/// * [viewOf], which can find a [TestFlutterView] related to a given finder. /// * [viewOf], which can find a [TestFlutterView] related to a given finder.
/// This is how to modify view properties for testing when dealing with /// This is how to modify view properties for testing when dealing with
/// multiple views. /// multiple views.
TestFlutterView get view { TestFlutterView get view => platformDispatcher.implicitView!;
assert(platformDispatcher.views.length == 1, 'When testing with multiple views, use `viewOf` instead.');
return platformDispatcher.views.single;
}
/// Provides access to a [SemanticsController] for testing anything related to /// Provides access to a [SemanticsController] for testing anything related to
/// the [Semantics] tree. /// the [Semantics] tree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment