Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/layers/macos/Runner/DebugProfile.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
Expand Down
179 changes: 6 additions & 173 deletions packages/flutter/test/material/debug_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void main() {
'or WidgetsApp widget at the top of your application widget tree.\n',
),
);
expect(error.toStringDeep(), equalsIgnoringHashCodes(
expect(error.toStringDeep(), startsWith(
'FlutterError\n'
' No Scaffold widget found.\n'
' Builder widgets require a Scaffold widget ancestor.\n'
Expand All @@ -128,114 +128,8 @@ void main() {
' The ancestors of this widget were:\n'
' Semantics\n'
' Builder\n'
' RepaintBoundary-[GlobalKey#00000]\n'
' IgnorePointer\n'
' AnimatedBuilder\n'
' FadeTransition\n'
' FractionalTranslation\n'
' SlideTransition\n'
' _FadeUpwardsPageTransition\n'
' AnimatedBuilder\n'
' RepaintBoundary\n'
' _FocusInheritedScope\n'
' Semantics\n'
' FocusScope\n'
' PrimaryScrollController\n'
' _ActionsScope\n'
' Actions\n'
' Builder\n'
' PageStorage\n'
' Offstage\n'
' _ModalScopeStatus\n'
' UnmanagedRestorationScope\n'
' RestorationScope\n'
' AnimatedBuilder\n'
' _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#00000]\n'
' Semantics\n'
' _RenderTheaterMarker\n'
' _EffectiveTickerMode\n'
' TickerMode\n'
' _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#00000]\n'
' _Theater\n'
' Overlay-[LabeledGlobalKey<OverlayState>#00000]\n'
' UnmanagedRestorationScope\n'
' _FocusInheritedScope\n'
' Focus\n'
' _FocusInheritedScope\n'
' Focus\n'
' FocusTraversalGroup\n'
' AbsorbPointer\n'
' Listener\n'
' HeroControllerScope\n'
' Navigator-[GlobalObjectKey<NavigatorState> _WidgetsAppState#00000]\n'
' _FocusInheritedScope\n'
' Semantics\n'
' FocusScope\n'
' DefaultSelectionStyle\n'
' IconTheme\n'
' IconTheme\n'
' _InheritedCupertinoTheme\n'
' CupertinoTheme\n'
' _InheritedTheme\n'
' Theme\n'
' AnimatedTheme\n'
' DefaultSelectionStyle\n'
' _ScaffoldMessengerScope\n'
' ScaffoldMessenger\n'
' Builder\n'
' DefaultTextStyle\n'
' CustomPaint\n'
' Banner\n'
' CheckedModeBanner\n'
' Title\n'
' Directionality\n'
' _LocalizationsScope-[GlobalKey#00000]\n'
' Semantics\n'
' Localizations\n'
' Semantics\n'
' _FocusInheritedScope\n'
' Focus\n'
' Shortcuts\n'
' _ShortcutRegistrarScope\n'
' ShortcutRegistrar\n'
' TapRegionSurface\n'
' _FocusInheritedScope\n'
' Focus\n'
' FocusTraversalGroup\n'
' _ActionsScope\n'
' Actions\n'
'${kIsWeb
? ' Semantics\n'
' _FocusInheritedScope\n'
' Focus\n'
' Shortcuts\n'
: ''}'
' Semantics\n'
' _FocusInheritedScope\n'
' Focus\n'
' Shortcuts\n'
' DefaultTextEditingShortcuts\n'
' Semantics\n'
' _FocusInheritedScope\n'
' Focus\n'
' Shortcuts\n'
' _SharedAppModel\n'
' SharedAppData\n'
' UnmanagedRestorationScope\n'
' RestorationScope\n'
' UnmanagedRestorationScope\n'
' RootRestorationScope\n'
' WidgetsApp-[GlobalObjectKey _MaterialAppState#00000]\n'
' Semantics\n'
' _FocusInheritedScope\n'
' Focus\n'
' HeroControllerScope\n'
' ScrollConfiguration\n'
' MaterialApp\n'
' MediaQuery\n'
' _MediaQueryFromView\n'
' _ViewScope\n'
' View-[GlobalObjectKey TestFlutterView#00000]\n'
));
expect(error.toStringDeep(), endsWith(
' [root]\n'
' Typically, the Scaffold widget is introduced by the MaterialApp\n'
' or WidgetsApp widget at the top of your application widget tree.\n'
Expand Down Expand Up @@ -302,7 +196,7 @@ void main() {
'MaterialApp at the top of your application widget tree.\n',
),
);
expect(error.toStringDeep(), equalsIgnoringHashCodes(
expect(error.toStringDeep(), startsWith(
'FlutterError\n'
' No ScaffoldMessenger widget found.\n'
' SnackBarAction widgets require a ScaffoldMessenger widget\n'
Expand All @@ -314,69 +208,8 @@ void main() {
' TextButtonTheme\n'
' Padding\n'
' Row\n'
' Wrap\n'
' Padding\n'
' MediaQuery\n'
' Padding\n'
' SafeArea\n'
' FadeTransition\n'
' DefaultSelectionStyle\n'
' IconTheme\n'
' IconTheme\n'
' _InheritedCupertinoTheme\n'
' CupertinoTheme\n'
' _InheritedTheme\n'
' Theme\n'
' DefaultTextStyle\n'
' AnimatedDefaultTextStyle\n'
' _InkFeatures-[GlobalKey#00000 ink renderer]\n'
' NotificationListener<LayoutChangedNotification>\n'
' PhysicalModel\n'
' AnimatedPhysicalModel\n'
' Material\n'
' KeyedSubtree-[GlobalKey#00000]\n'
' FractionalTranslation\n'
' SlideTransition\n'
' Listener\n'
' _GestureSemantics\n'
' RawGestureDetector\n'
' GestureDetector\n'
" Dismissible-[<'dismissible'>]\n"
' Semantics\n'
' Align\n'
' AnimatedBuilder\n'
' ClipRect\n'
' KeyedSubtree-[GlobalKey#00000]\n'
' _EffectiveTickerMode\n'
' TickerMode\n'
' Offstage\n'
' SizedBox\n'
' Hero\n'
' SnackBar-[#00000]\n'
' MediaQuery\n'
' LayoutId-[<_ScaffoldSlot.snackBar>]\n'
' CustomMultiChildLayout\n'
' _ActionsScope\n'
' Actions\n'
' AnimatedBuilder\n'
' DefaultTextStyle\n'
' AnimatedDefaultTextStyle\n'
' _InkFeatures-[GlobalKey#00000 ink renderer]\n'
' NotificationListener<LayoutChangedNotification>\n'
' PhysicalModel\n'
' AnimatedPhysicalModel\n'
' Material\n'
' _ScrollNotificationObserverScope\n'
' NotificationListener<ScrollNotification>\n'
' NotificationListener<ScrollMetricsNotification>\n'
' ScrollNotificationObserver\n'
' _ScaffoldScope\n'
' Scaffold-[LabeledGlobalKey<ScaffoldState>#00000]\n'
' Directionality\n'
' MediaQuery\n'
' _MediaQueryFromView\n'
' _ViewScope\n'
' View-[GlobalObjectKey TestFlutterView#00000]\n'
));
expect(error.toStringDeep(), endsWith(
' [root]\n'
' Typically, the ScaffoldMessenger widget is introduced by the\n'
' MaterialApp at the top of your application widget tree.\n'
Expand Down
30 changes: 3 additions & 27 deletions packages/flutter/test/material/scaffold_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2501,40 +2501,16 @@ void main() {
'MaterialApp at the top of your application widget tree.\n',
),
);
expect(error.toStringDeep(), equalsIgnoringHashCodes(
expect(error.toStringDeep(), startsWith(
'FlutterError\n'
' No ScaffoldMessenger widget found.\n'
' Builder widgets require a ScaffoldMessenger widget ancestor.\n'
' The specific widget that could not find a ScaffoldMessenger\n'
' ancestor was:\n'
' Builder\n'
' The ancestors of this widget were:\n'
' KeyedSubtree-[GlobalKey#00000]\n'
' _BodyBuilder\n'
' MediaQuery\n'
' LayoutId-[<_ScaffoldSlot.body>]\n'
' CustomMultiChildLayout\n'
' _ActionsScope\n'
' Actions\n'
' AnimatedBuilder\n'
' DefaultTextStyle\n'
' AnimatedDefaultTextStyle\n'
' _InkFeatures-[GlobalKey#00000 ink renderer]\n'
' NotificationListener<LayoutChangedNotification>\n'
' PhysicalModel\n'
' AnimatedPhysicalModel\n'
' Material\n'
' _ScrollNotificationObserverScope\n'
' NotificationListener<ScrollNotification>\n'
' NotificationListener<ScrollMetricsNotification>\n'
' ScrollNotificationObserver\n'
' _ScaffoldScope\n'
' Scaffold\n'
' Directionality\n'
' MediaQuery\n'
' _MediaQueryFromView\n'
' _ViewScope\n'
' View-[GlobalObjectKey TestFlutterView#e6136]\n'
));
expect(error.toStringDeep(), endsWith(
' [root]\n'
' Typically, the ScaffoldMessenger widget is introduced by the\n'
' MaterialApp at the top of your application widget tree.\n',
Expand Down
1 change: 0 additions & 1 deletion packages/flutter/test/rendering/simple_semantics_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:flutter_test/flutter_test.dart';

import 'rendering_tester.dart';


void main() {
TestRenderingFlutterBinding.ensureInitialized();

Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/widgets/framework_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ void main() {

testWidgets('RenderObjectElement.unmount disposes of its renderObject', (WidgetTester tester) async {
await tester.pumpWidget(const Placeholder());
final RenderObjectElement element = tester.allElements.whereType<RenderObjectElement>().first;
final RenderObjectElement element = tester.allElements.whereType<RenderObjectElement>().last;
final RenderObject renderObject = element.renderObject;
expect(renderObject.debugDisposed, false);

Expand Down
20 changes: 9 additions & 11 deletions packages/flutter/test/widgets/heroes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1182,22 +1182,20 @@ Future<void> main() async {
await tester.pump(const Duration(milliseconds: 100));
expect(tester.getTopLeft(find.byKey(heroABKey)).dy, 100.0);

bool isVisible(Element node) {
bool visible = true;
node.visitAncestorElements((Element ancestor) {
final RenderObject r = ancestor.renderObject!;
if (r is RenderAnimatedOpacity && r.opacity.value == 0) {
visible = false;
bool isVisible(RenderObject node) {
RenderObject? currentNode = node;
while (currentNode != null) {
if (currentNode is RenderAnimatedOpacity && currentNode.opacity.value == 0) {
return false;
}
return true;
});
return visible;
currentNode = currentNode.parent as RenderObject?;
}
return true;
}

// Of all heroes only one should be visible now.
final Iterable<Element> elements = find.text('Hero').evaluate();
expect(elements.where(isVisible).length, 1);
final Iterable<RenderObject> renderObjects = find.text('Hero').evaluate().map((Element e) => e.renderObject!);
expect(renderObjects.where(isVisible).length, 1);

// Hero BC's flight finishes normally.
await tester.pump(const Duration(milliseconds: 300));
Expand Down