Unverified Commit 3c321ac8 authored by Ming Lyu (CareF)'s avatar Ming Lyu (CareF) Committed by GitHub

cleanup (#66743)

parent e605b7c2
...@@ -528,8 +528,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker ...@@ -528,8 +528,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
assert(records != null); assert(records != null);
assert(records.isNotEmpty); assert(records.isNotEmpty);
return TestAsyncUtils.guard<List<Duration>>(() async { return TestAsyncUtils.guard<List<Duration>>(() async {
// hitTestHistory is an equivalence of _hitTests in [GestureBinding]
final Map<int, HitTestResult> hitTestHistory = <int, HitTestResult>{};
final List<Duration> handleTimeStampDiff = <Duration>[]; final List<Duration> handleTimeStampDiff = <Duration>[];
DateTime startTime; DateTime startTime;
for (final PointerEventRecord record in records) { for (final PointerEventRecord record in records) {
...@@ -544,8 +542,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker ...@@ -544,8 +542,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
binding.handlePointerEvent(event, source: TestBindingEventSource.test); binding.handlePointerEvent(event, source: TestBindingEventSource.test);
} }
} else { } else {
// TODO(CareF): reconsider the pumping strategy after
// https://github.com/flutter/flutter/issues/60739 is fixed
await binding.pump(); await binding.pump();
await binding.delayed(timeDiff); await binding.delayed(timeDiff);
handleTimeStampDiff.add( handleTimeStampDiff.add(
...@@ -559,7 +555,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker ...@@ -559,7 +555,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
await binding.pump(); await binding.pump();
// This makes sure that a gesture is completed, with no more pointers // This makes sure that a gesture is completed, with no more pointers
// active. // active.
assert(hitTestHistory.isEmpty);
return handleTimeStampDiff; return handleTimeStampDiff;
}); });
} }
......
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