Unverified Commit 5b6572f9 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add debug diagnostics to channels integration test (#119579)

parent 65900b71
...@@ -6,6 +6,7 @@ import 'dart:async'; ...@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_driver/driver_extension.dart'; import 'package:flutter_driver/driver_extension.dart';
...@@ -16,6 +17,8 @@ import 'src/test_step.dart'; ...@@ -16,6 +17,8 @@ import 'src/test_step.dart';
void main() { void main() {
enableFlutterDriverExtension(); enableFlutterDriverExtension();
// TODO(goderbauer): Remove this once https://github.com/flutter/flutter/issues/116663 is diagnosed.
debugPrintHitTestResults = true;
runApp(const TestApp()); runApp(const TestApp());
} }
......
...@@ -357,7 +357,7 @@ mixin GestureBinding on BindingBase implements HitTestable, HitTestDispatcher, H ...@@ -357,7 +357,7 @@ mixin GestureBinding on BindingBase implements HitTestable, HitTestDispatcher, H
void _handlePointerEventImmediately(PointerEvent event) { void _handlePointerEventImmediately(PointerEvent event) {
HitTestResult? hitTestResult; HitTestResult? hitTestResult;
if (event is PointerDownEvent || event is PointerSignalEvent || event is PointerHoverEvent || event is PointerPanZoomStartEvent) { if (event is PointerDownEvent || event is PointerSignalEvent || event is PointerHoverEvent || event is PointerPanZoomStartEvent) {
assert(!_hitTests.containsKey(event.pointer), 'Pointer of $event unexpectedly has a HitTestResult associated with it.'); assert(!_hitTests.containsKey(event.pointer), 'Pointer of ${event.toString(minLevel: DiagnosticLevel.debug)} unexpectedly has a HitTestResult associated with it.');
hitTestResult = HitTestResult(); hitTestResult = HitTestResult();
hitTest(hitTestResult, event.position); hitTest(hitTestResult, event.position);
if (event is PointerDownEvent || event is PointerPanZoomStartEvent) { if (event is PointerDownEvent || event is PointerPanZoomStartEvent) {
...@@ -365,7 +365,7 @@ mixin GestureBinding on BindingBase implements HitTestable, HitTestDispatcher, H ...@@ -365,7 +365,7 @@ mixin GestureBinding on BindingBase implements HitTestable, HitTestDispatcher, H
} }
assert(() { assert(() {
if (debugPrintHitTestResults) { if (debugPrintHitTestResults) {
debugPrint('$event: $hitTestResult'); debugPrint('${event.toString(minLevel: DiagnosticLevel.debug)}: $hitTestResult');
} }
return true; return true;
}()); }());
......
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