mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove key simulation obsolete comments (#122389)
Remove key simulation obsolete comments
This commit is contained in:
parent
ad5deb8642
commit
376d8baabc
@ -132,12 +132,12 @@ class SemanticsController {
|
|||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * [containsSemantics] and [matchesSemantics], which can be used to match
|
/// * [containsSemantics] and [matchesSemantics], which can be used to match
|
||||||
/// against a single node in the traversal
|
/// against a single node in the traversal.
|
||||||
/// * [containsAllInOrder], which can be given an [Iterable<Matcher>] to fuzzy
|
/// * [containsAllInOrder], which can be given an [Iterable<Matcher>] to fuzzy
|
||||||
/// match the order allowing extra nodes before after and between matching
|
/// match the order allowing extra nodes before after and between matching
|
||||||
/// parts of the traversal
|
/// parts of the traversal.
|
||||||
/// * [orderedEquals], which can be given an [Iterable<Matcher>] to exactly
|
/// * [orderedEquals], which can be given an [Iterable<Matcher>] to exactly
|
||||||
/// match the order of the traversal
|
/// match the order of the traversal.
|
||||||
Iterable<SemanticsNode> simulatedAccessibilityTraversal({Finder? start, Finder? end}) {
|
Iterable<SemanticsNode> simulatedAccessibilityTraversal({Finder? start, Finder? end}) {
|
||||||
TestAsyncUtils.guardSync();
|
TestAsyncUtils.guardSync();
|
||||||
final List<SemanticsNode> traversal = <SemanticsNode>[];
|
final List<SemanticsNode> traversal = <SemanticsNode>[];
|
||||||
@ -784,8 +784,10 @@ abstract class WidgetController {
|
|||||||
///
|
///
|
||||||
/// The [WidgetTester] subclass implements this by deferring to the [binding].
|
/// The [WidgetTester] subclass implements this by deferring to the [binding].
|
||||||
///
|
///
|
||||||
/// See also [SchedulerBinding.endOfFrame], which returns a future that could
|
/// See also:
|
||||||
/// be appropriate to return in the implementation of this method.
|
///
|
||||||
|
/// * [SchedulerBinding.endOfFrame], which returns a future that could be
|
||||||
|
/// appropriate to return in the implementation of this method.
|
||||||
Future<void> pump([Duration duration]);
|
Future<void> pump([Duration duration]);
|
||||||
|
|
||||||
/// Repeatedly calls [pump] with the given `duration` until there are no
|
/// Repeatedly calls [pump] with the given `duration` until there are no
|
||||||
@ -1110,8 +1112,9 @@ abstract class WidgetController {
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
/// * [WidgetController.drag], a method to simulate a drag.
|
/// * [WidgetController.drag], a method to simulate a drag.
|
||||||
/// * [WidgetController.timedDrag], a method to simulate the drag of a given widget in a given duration.
|
/// * [WidgetController.timedDrag], a method to simulate the drag of a given
|
||||||
/// It sends move events at a given frequency and it is useful when there are listeners involved.
|
/// widget in a given duration. It sends move events at a given frequency and
|
||||||
|
/// it is useful when there are listeners involved.
|
||||||
/// * [WidgetController.fling], a method to simulate a fling.
|
/// * [WidgetController.fling], a method to simulate a fling.
|
||||||
Future<TestGesture> startGesture(
|
Future<TestGesture> startGesture(
|
||||||
Offset downLocation, {
|
Offset downLocation, {
|
||||||
@ -1313,8 +1316,7 @@ abstract class WidgetController {
|
|||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [platform.Platform.operatingSystem] to make the event appear to be from
|
/// [platform.Platform.operatingSystem] to make the event appear to be from
|
||||||
/// that type of system. Defaults to "web" on web, and "android" everywhere
|
/// that type of system. Defaults to "web" on web, and "android" everywhere
|
||||||
/// else. Must not be null. Some platforms (e.g. Windows, iOS) are not yet
|
/// else. Must not be null.
|
||||||
/// supported.
|
|
||||||
///
|
///
|
||||||
/// Specify the `physicalKey` for the event to override what is included in
|
/// Specify the `physicalKey` for the event to override what is included in
|
||||||
/// the simulated event. If not specified, it uses a default from the US
|
/// the simulated event. If not specified, it uses a default from the US
|
||||||
@ -1359,8 +1361,7 @@ abstract class WidgetController {
|
|||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [platform.Platform.operatingSystem] to make the event appear to be from
|
/// [platform.Platform.operatingSystem] to make the event appear to be from
|
||||||
/// that type of system. Defaults to "web" on web, and "android" everywhere
|
/// that type of system. Defaults to "web" on web, and "android" everywhere
|
||||||
/// else. Must not be null. Some platforms (e.g. Windows, iOS) are not yet
|
/// else. Must not be null.
|
||||||
/// supported.
|
|
||||||
///
|
///
|
||||||
/// Specify the `physicalKey` for the event to override what is included in
|
/// Specify the `physicalKey` for the event to override what is included in
|
||||||
/// the simulated event. If not specified, it uses a default from the US
|
/// the simulated event. If not specified, it uses a default from the US
|
||||||
@ -1433,7 +1434,7 @@ abstract class WidgetController {
|
|||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [platform.Platform.operatingSystem] to make the event appear to be from that type
|
/// [platform.Platform.operatingSystem] to make the event appear to be from that type
|
||||||
/// of system. Defaults to "web" on web, and "android" everywhere else. Must not be
|
/// of system. Defaults to "web" on web, and "android" everywhere else. Must not be
|
||||||
/// null. Some platforms (e.g. Windows, iOS) are not yet supported.
|
/// null.
|
||||||
///
|
///
|
||||||
/// Specify the `physicalKey` for the event to override what is included in
|
/// Specify the `physicalKey` for the event to override what is included in
|
||||||
/// the simulated event. If not specified, it uses a default from the US
|
/// the simulated event. If not specified, it uses a default from the US
|
||||||
@ -1639,12 +1640,12 @@ class LiveWidgetController extends WidgetController {
|
|||||||
for (final PointerEventRecord record in records) {
|
for (final PointerEventRecord record in records) {
|
||||||
final DateTime now = clock.now();
|
final DateTime now = clock.now();
|
||||||
startTime ??= now;
|
startTime ??= now;
|
||||||
// So that the first event is promised to receive a zero timeDiff
|
// So that the first event is promised to receive a zero timeDiff.
|
||||||
final Duration timeDiff = record.timeDelay - now.difference(startTime);
|
final Duration timeDiff = record.timeDelay - now.difference(startTime);
|
||||||
if (timeDiff.isNegative) {
|
if (timeDiff.isNegative) {
|
||||||
// This happens when something (e.g. GC) takes a long time during the
|
// This happens when something (e.g. GC) takes a long time during the
|
||||||
// processing of the events.
|
// processing of the events.
|
||||||
// Flush all past events
|
// Flush all past events.
|
||||||
handleTimeStampDiff.add(-timeDiff);
|
handleTimeStampDiff.add(-timeDiff);
|
||||||
record.events.forEach(binding.handlePointerEvent);
|
record.events.forEach(binding.handlePointerEvent);
|
||||||
} else {
|
} else {
|
||||||
|
@ -742,8 +742,7 @@ class KeyEventSimulator {
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Keys that are down when the test completes are cleared after each test.
|
/// Keys that are down when the test completes are cleared after each test.
|
||||||
///
|
///
|
||||||
@ -790,8 +789,7 @@ class KeyEventSimulator {
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Returns true if the key event was handled by the framework.
|
/// Returns true if the key event was handled by the framework.
|
||||||
///
|
///
|
||||||
@ -835,8 +833,7 @@ class KeyEventSimulator {
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Returns true if the key event was handled by the framework.
|
/// Returns true if the key event was handled by the framework.
|
||||||
///
|
///
|
||||||
@ -885,8 +882,7 @@ class KeyEventSimulator {
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Keys that are down when the test completes are cleared after each test.
|
/// Keys that are down when the test completes are cleared after each test.
|
||||||
///
|
///
|
||||||
@ -920,8 +916,7 @@ Future<bool> simulateKeyDownEvent(
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Returns true if the key event was handled by the framework.
|
/// Returns true if the key event was handled by the framework.
|
||||||
///
|
///
|
||||||
@ -949,8 +944,7 @@ Future<bool> simulateKeyUpEvent(
|
|||||||
///
|
///
|
||||||
/// Specify `platform` as one of the platforms allowed in
|
/// Specify `platform` as one of the platforms allowed in
|
||||||
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
/// [Platform.operatingSystem] to make the event appear to be from that type of
|
||||||
/// system. Defaults to the operating system that the test is running on. Some
|
/// system. Defaults to the operating system that the test is running on.
|
||||||
/// platforms (e.g. Windows, iOS) are not yet supported.
|
|
||||||
///
|
///
|
||||||
/// Returns true if the key event was handled by the framework.
|
/// Returns true if the key event was handled by the framework.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user