Unverified Commit 9570d353 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add missing debug vars to debugAssertAllRenderVarsUnset (#91848)

parent ac745b3f
...@@ -238,8 +238,12 @@ bool debugAssertAllRenderVarsUnset(String reason, { bool debugCheckIntrinsicSize ...@@ -238,8 +238,12 @@ bool debugAssertAllRenderVarsUnset(String reason, { bool debugCheckIntrinsicSize
debugPrintMarkNeedsPaintStacks || debugPrintMarkNeedsPaintStacks ||
debugPrintLayouts || debugPrintLayouts ||
debugCheckIntrinsicSizes != debugCheckIntrinsicSizesOverride || debugCheckIntrinsicSizes != debugCheckIntrinsicSizesOverride ||
debugProfileLayoutsEnabled ||
debugProfilePaintsEnabled || debugProfilePaintsEnabled ||
debugOnProfilePaint != null) { debugOnProfilePaint != null ||
debugDisableClipLayers ||
debugDisablePhysicalShapeLayers ||
debugDisableOpacityLayers) {
throw FlutterError(reason); throw FlutterError(reason);
} }
return true; return true;
......
...@@ -234,4 +234,28 @@ void main() { ...@@ -234,4 +234,28 @@ void main() {
expect(opacityLayer.offset, const Offset(40, 40)); expect(opacityLayer.offset, const Offset(40, 40));
debugDisableOpacityLayers = false; debugDisableOpacityLayers = false;
}); });
test('debugAssertAllRenderVarsUnset warns when debugProfileLayoutsEnabled set', () {
debugProfileLayoutsEnabled = true;
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
debugProfileLayoutsEnabled = false;
});
test('debugAssertAllRenderVarsUnset warns when debugDisableClipLayers set', () {
debugDisableClipLayers = true;
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
debugDisableClipLayers = false;
});
test('debugAssertAllRenderVarsUnset warns when debugDisablePhysicalShapeLayers set', () {
debugDisablePhysicalShapeLayers = true;
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
debugDisablePhysicalShapeLayers = false;
});
test('debugAssertAllRenderVarsUnset warns when debugDisableOpacityLayers set', () {
debugDisableOpacityLayers = true;
expect(() => debugAssertAllRenderVarsUnset('ERROR'), throwsFlutterError);
debugDisableOpacityLayers = false;
});
} }
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