Repository navigation
[cross imports] navigator_test.dart - #190954
Conversation
| ), | ||
| '/2' => _TestTransitionRoute<void>( | ||
| pageTransitionsBuilder: const _TestSlightRightPageTransitionsBuilder(), | ||
| pageTransitionsBuilder: const _TestSlideRightPageTransitionsBuilder(), |
There was a problem hiding this comment.
Typo from yours truly
There was a problem hiding this comment.
Code Review
This pull request adds the onGenerateInitialRoutes parameter to TestWidgetsApp along with corresponding tests, and refactors several widget tests to use TestWidgetsApp, TestRoute, TestPage, and TestButton instead of Material-specific equivalents. Feedback on these changes suggests avoiding the use of dynamic in Localizations delegates by using Object? instead, and using explicit <Widget>[] type arguments for collection literals in a Column to maintain consistency with the style guide.
| ); | ||
| }); | ||
|
|
||
| testWidgets('onGenerateInitialRoutes defaults to null', (WidgetTester tester) async { |
There was a problem hiding this comment.
Some context for this one: I was also looking into the navigator restoration test, which needed this.
I didn't add that one for this PR though
33dd2d9 to
d7e0fe7
Compare
d7e0fe7 to
cf1e29d
Compare
0cecbb6 to
7bde05a
Compare
7bde05a to
c63da42
Compare
|
Updated to reformat with Dart 3.13 after the tree reopened |
c63da42 to
3371285
Compare
3371285 to
a94db5b
Compare
| import 'dart:ui' show FlutterView; | ||
|
|
||
| import 'package:flutter/foundation.dart'; | ||
| import 'package:flutter/material.dart'; |
There was a problem hiding this comment.
Still importing material?
There was a problem hiding this comment.
Yes, because the last one is a TabView test that uses the navigator. I'll move that over to material_ui in a new PR, before (re)moving it in flutter/flutter.
It's this test: https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/navigator_test.dart#L976
See also: #175592
…aversal_test + navigator_test
a94db5b to
bd7d595
Compare
…#13060) Manual roll Flutter from 4fcd90be0045 to c5a061b18fa2 (222 revisions) Manual roll requested by [email protected] flutter/flutter@4fcd90b...c5a061b 2026-09-28 [email protected] [cross imports] navigator_test.dart (flutter/flutter#190954) 2026-09-28 [email protected] Revert: Reland: Only render views that need to be rendered (flutter/flutter#193360) 2026-09-28 [email protected] ci(bringup): android_intent_security_test is green (flutter/flutter#193469) 2026-09-28 [email protected] Sync CHANGELOG.md from stable (flutter/flutter#193020) 2026-09-28 [email protected] Roll Fuchsia Linux SDK from ukukV5lEkKabtOATk... to QdgqP02_cYpRQQQNN... (flutter/flutter#193454) 2026-09-28 [email protected] Roll pub packages (flutter/flutter#193460) 2026-09-28 [email protected] Un-nest sceneBuildDuration and windowRenderDuration in web SceneBuilderRecorder (flutter/flutter#193260) 2026-09-28 [email protected] Fix unresolved doc comment references in dev/integration_tests and dev/benchmarks (flutter/flutter#193433) 2026-09-28 [email protected] Roll Packages from e55e7ac to ba0364a (9 revisions) (flutter/flutter#193450) 2026-09-28 [email protected] [tool] Require explicit dependency injection for FlutterDevice and FlutterDevice.create (flutter/flutter#192830) 2026-09-28 [email protected] Roll pub packages (flutter/flutter#193442) 2026-09-28 [email protected] [flutter_tools] Include data assets from hooks when pubspec.yaml is empty (flutter/flutter#193434) 2026-09-28 [email protected] Roll pub packages (flutter/flutter#193438) 2026-09-28 [email protected] Fix unresolved doc comment references in Material and Cupertino (flutter/flutter#193283) 2026-09-28 [email protected] Fix doc references to Material and Cupertino in the widgets library and its tests (flutter/flutter#193334) 2026-09-26 [email protected] wasm: enforce WasmGC opt-in capability checks and Firefox < 147 guard (flutter/flutter#193180) 2026-09-26 [email protected] [Android] Refuse external setters of engine entrypoint and cached engine arguments via `Intent`s (flutter/flutter#190249) 2026-09-26 [email protected] [web] Unskip TextPainter.getWordBoundary test (flutter/flutter#193378) 2026-09-26 [email protected] Specify non-obvious types in pattern variable declarations (flutter/flutter#192632) 2026-09-26 [email protected] Removes feedback loop from advanced filters without offscreen msaa and framebufferfetch (flutter/flutter#193306) 2026-09-26 [email protected] [web] Unskip 8 passing image tests in painting and rendering (flutter/flutter#193377) 2026-09-26 [email protected] Revert: Allow resetting test invariants in `addTearDown` (flutter/flutter#193383) 2026-09-25 [email protected] [tool] Migrate CoverageCollector to modular dependency injection (flutter/flutter#192924) 2026-09-25 [email protected] Fix more unresolved doc comment references (flutter/flutter#193336) 2026-09-25 [email protected] Allow resetting test invariants in `addTearDown` (flutter/flutter#192082) 2026-09-25 [email protected] [a11y] Add a semantics role for slider (flutter/flutter#193324) 2026-09-25 [email protected] Fix plugin tests after Pigeon plugin template changes (flutter/flutter#193302) 2026-09-25 [email protected] [Android 17] Bump Standard Test Apps in flutter/flutter to AGP 9.3.1 (flutter/flutter#193263) 2026-09-25 [email protected] SSBO-based gradients in UberSDF (flutter/flutter#192962) 2026-09-25 [email protected] [Linux] Handle FlView being destroyed before rendering is complete. (flutter/flutter#193268) 2026-09-25 [email protected] [flutter_tools] Handle Windows reserved characters in test target path (flutter/flutter#191900) 2026-09-25 [email protected] docs(tools): nit: say hook/build.dart in CMake native assets comment (flutter/flutter#192205) 2026-09-25 [email protected] [web] Enable Firefox Skwasm UI CI suites, configure COI configs, and fail fast on loader rejections (flutter/flutter#193187) 2026-09-25 [email protected] [Android 17] Bumped Engine Dependencies to 9.3.1 (flutter/flutter#193265) 2026-09-25 [email protected] [web] Omit group role on menu scrollables and assign region role to named routes (flutter/flutter#192965) 2026-09-25 [email protected] Roll Skia from 8eedeed98e79 to f441ca223b2b (5 revisions) (flutter/flutter#193353) 2026-09-25 [email protected] Roll Fuchsia Linux SDK from EbPpoJW-Lnsu-8dyZ... to ukukV5lEkKabtOATk... (flutter/flutter#193326) 2026-09-25 [email protected] Roll Packages from 431ea69 to e55e7ac (6 revisions) (flutter/flutter#193351) 2026-09-25 [email protected] Support DynamicLibrary.codeAsset in Flutter (flutter/flutter#188947) 2026-09-25 [email protected] Roll Dart SDK from 75d9e87d4e3d to 0e7642b85457 (1 revision) (flutter/flutter#193346) 2026-09-25 [email protected] Exclude iOS PRs from macOS link (flutter/flutter#193315) 2026-09-25 [email protected] Roll Skia from 6357608543ec to 8eedeed98e79 (4 revisions) (flutter/flutter#193341) 2026-09-25 [email protected] Roll Dart SDK from d3aedb186aab to 75d9e87d4e3d (3 revisions) (flutter/flutter#193335) 2026-09-25 [email protected] Cache the paint offset adjusted line metrics in TextPainter (flutter/flutter#191223) ...
This PR fixes cross imports in navigator_test.dart, except for one test that is a regression test with TabBarView/TabController. (That test will need to be moved first, and the old test be deleted, rewritten after it was moved)
It also cleans up some bits around test routes.
Part of #177415
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.