Skip to content

Commit 1ac920a

Browse files
[web] Unskip web tests that now pass in gestures, services, and widgets (flutter#193512)
Removes or narrows 5 web skips across 5 framework test files: - `packages/flutter/test/gestures/gesture_binding_resample_event_test.dart`: removes the `skip: isBrowser` from the shared `testResampleEvent` helper. Pointer event resampling under `fakeAsync` now works on web, so every resample test in the file runs on web. - `packages/flutter/test/widgets/binding_test.dart`: narrows the skip on `defaultStackFilter elides framework Element mounting stacks` from `kIsWeb` to `kIsWasm`. It passes with CanvasKit but still fails with Skwasm, which flutter#87875 continues to track. - `packages/flutter/test/widgets/keep_alive_test.dart`: unskips `KeepAlive render tree description`. The test only failed because the expected `RenderView` description used `Platform.operatingSystem`. `RenderView.debugFillProperties` prints `Web` on web (`kIsWeb ? 'Web' : Platform.operatingSystem`), so the two expected strings now match that logic. - `packages/flutter/test/widgets/app_overrides_test.dart`: unskips `showPerformanceOverlayOverride true`. The test only checks that a `PerformanceOverlay` widget is inserted into the tree, which works on web. It does not depend on the overlay rendering stats, which is what flutter#52258 tracks. - `packages/flutter/test/services/scribe_test.dart`: unskips `when receiving an unsupported message`, which checks that an unsupported `flutter/scribe` platform message returns a `null` response (the `MissingPluginException` is caught). Platform message handling behaves the same on web, so the `[intended]` skip is unnecessary. The other `[intended]` web skips in this file are unchanged. Fixes flutter#87067 Fixes flutter#87876 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent 62bae03 commit 1ac920a

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎packages/flutter/test/gestures/gesture_binding_resample_event_test.dart‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ void testResampleEvent(String description, ResampleEventTest callback) {
5656
fakeAsync((FakeAsync async) {
5757
callback(async);
5858
}, initialTime: DateTime.utc(2015));
59-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/87067
60-
// Fake clock is not working with the web platform.
59+
});
6160
}
6261

6362
void main() {

‎packages/flutter/test/services/scribe_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
// When a MissingPluginException is thrown, it is caught and a null response
2424
// is returned.
2525
expect(response, isNull);
26-
}, skip: kIsWeb); // [intended]
26+
});
2727

2828
for (final returnValue in <bool?>[false, true, null]) {
2929
test('Scribe.isStylusHandwritingAvailable calls through to platform channel', () async {

‎packages/flutter/test/widgets/app_overrides_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void main() {
3636
expect(find.byType(PerformanceOverlay), findsOneWidget);
3737
expect(find.byType(CheckedModeBanner), findsOneWidget);
3838
WidgetsApp.showPerformanceOverlayOverride = false;
39-
}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/52258
39+
});
4040

4141
testWidgets('showPerformanceOverlayOverride false', (WidgetTester tester) async {
4242
WidgetsApp.showPerformanceOverlayOverride = true;

‎packages/flutter/test/widgets/binding_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ void main() {
837837
expect(errorDetails.exception, isAssertionError);
838838
const toMatch = '... Normal element mounting (';
839839
expect(toMatch.allMatches(errorDetails.toString()).length, 1);
840-
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87875
840+
}, skip: kIsWasm); // https://github.com/flutter/flutter/issues/87875
841841

842842
group('WidgetsBindingObserver callbacks handle exceptions gracefully', () {
843843
testWidgets('didChangeAppLifecycleState', (WidgetTester tester) async {

‎packages/flutter/test/widgets/keep_alive_test.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void main() {
211211
tester.binding.renderView.toStringDeep(minLevel: DiagnosticLevel.info, wrapWidth: 600),
212212
equalsIgnoringHashCodes(
213213
'_ReusableRenderView#00000\n'
214-
' │ debug mode enabled - ${Platform.operatingSystem}\n'
214+
' │ debug mode enabled - ${kIsWeb ? 'Web' : Platform.operatingSystem}\n'
215215
' │ view size: Size(2400.0, 1800.0) (in physical pixels)\n'
216216
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)\n'
217217
' │ configuration: BoxConstraints(w=800.0, h=600.0) at 3.0x (in logical pixels)\n'
@@ -364,7 +364,7 @@ void main() {
364364
tester.binding.renderView.toStringDeep(minLevel: DiagnosticLevel.info, wrapWidth: 600),
365365
equalsIgnoringHashCodes(
366366
'_ReusableRenderView#00000\n'
367-
' │ debug mode enabled - ${Platform.operatingSystem}\n'
367+
' │ debug mode enabled - ${kIsWeb ? 'Web' : Platform.operatingSystem}\n'
368368
' │ view size: Size(2400.0, 1800.0) (in physical pixels)\n'
369369
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)\n'
370370
' │ configuration: BoxConstraints(w=800.0, h=600.0) at 3.0x (in logical pixels)\n'
@@ -549,5 +549,5 @@ void main() {
549549
' preferredSize: Size(Infinity, Infinity)\n',
550550
),
551551
);
552-
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87876
552+
});
553553
}

0 commit comments

Comments
 (0)