Skip to content

Commit bb1c7a6

Browse files
[framework] Skip 5 failing framework tests. (#143618)
Part of flutter/flutter#143616
1 parent e0f126a commit bb1c7a6

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:io' as io;
6+
import 'package:flutter/foundation.dart';
7+
8+
/// Whether or not Flutter CI has configured Impeller for this test run.
9+
///
10+
/// This is intended only to be used for a migration effort to enable Impeller
11+
/// on Flutter CI.
12+
///
13+
/// See also: https://github.com/flutter/flutter/issues/143616
14+
bool get impellerEnabled {
15+
if (kIsWeb) {
16+
return false;
17+
}
18+
return io.Platform.environment.containsKey('FLUTTER_TEST_IMPELLER');
19+
}

packages/flutter/test/widgets/default_colors_test.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'dart:ui' as ui;
88
import 'package:flutter/material.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

11+
import '../impeller_test_helpers.dart';
12+
1113
const double _crispText = 100.0; // this font size is selected to avoid needing any antialiasing.
1214
const String _expText = 'Éxp'; // renders in the test font as:
1315

@@ -38,7 +40,7 @@ void main() {
3840
const Offset(799, 599): const Color(0x00000000), // the background
3941
},
4042
);
41-
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
43+
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
4244

4345
testWidgets('Default text color', (WidgetTester tester) async {
4446
await tester.pumpWidget(const ColoredBox(
@@ -63,7 +65,7 @@ void main() {
6365
const Offset(799, 599): const Color(0xFFABCDEF), // the background
6466
},
6567
);
66-
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
68+
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
6769

6870
testWidgets('Default text selection color', (WidgetTester tester) async {
6971
final GlobalKey key = GlobalKey();
@@ -118,7 +120,7 @@ void main() {
118120
const Offset(799, 599): const Color(0xFFFFFFFF), // the background
119121
},
120122
);
121-
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
123+
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
122124
}
123125

124126
Color _getPixel(ByteData bytes, int x, int y, int width) {

packages/flutter/test/widgets/snapshot_widget_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import 'package:flutter/rendering.dart';
1515
import 'package:flutter_test/flutter_test.dart';
1616
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
1717

18+
import '../impeller_test_helpers.dart';
19+
1820
void main() {
1921
testWidgets('SnapshotWidget can rasterize child', (WidgetTester tester) async {
2022
final SnapshotController controller = SnapshotController(allowSnapshotting: true);
@@ -325,7 +327,7 @@ void main() {
325327

326328
await expectLater(find.byKey(repaintBoundaryKey), matchesReferenceImage(imageWhenDisabled));
327329
},
328-
skip: kIsWeb); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689
330+
skip: kIsWeb || impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689
329331

330332
test('SnapshotPainter dispatches memory events', () async {
331333
await expectLater(

packages/flutter/test/widgets/widget_inspector_test.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import 'package:flutter/rendering.dart';
2121
import 'package:flutter_test/flutter_test.dart';
2222
import 'package:leak_tracker/leak_tracker.dart';
2323

24+
import '../impeller_test_helpers.dart';
2425
import 'widget_inspector_test_utils.dart';
2526

2627
// Start of block of code where widget creation location line numbers and
@@ -3869,7 +3870,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
38693870
_CreationLocation location = knownLocations[id]!;
38703871
expect(location.file, equals(file));
38713872
// ClockText widget.
3872-
expect(location.line, equals(56));
3873+
expect(location.line, equals(57));
38733874
expect(location.column, equals(9));
38743875
expect(location.name, equals('ClockText'));
38753876
expect(count, equals(1));
@@ -3879,7 +3880,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
38793880
location = knownLocations[id]!;
38803881
expect(location.file, equals(file));
38813882
// Text widget in _ClockTextState build method.
3882-
expect(location.line, equals(94));
3883+
expect(location.line, equals(95));
38833884
expect(location.column, equals(12));
38843885
expect(location.name, equals('Text'));
38853886
expect(count, equals(1));
@@ -3906,7 +3907,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
39063907
location = knownLocations[id]!;
39073908
expect(location.file, equals(file));
39083909
// ClockText widget.
3909-
expect(location.line, equals(56));
3910+
expect(location.line, equals(57));
39103911
expect(location.column, equals(9));
39113912
expect(location.name, equals('ClockText'));
39123913
expect(count, equals(3)); // 3 clock widget instances rebuilt.
@@ -3916,7 +3917,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
39163917
location = knownLocations[id]!;
39173918
expect(location.file, equals(file));
39183919
// Text widget in _ClockTextState build method.
3919-
expect(location.line, equals(94));
3920+
expect(location.line, equals(95));
39203921
expect(location.column, equals(12));
39213922
expect(location.name, equals('Text'));
39223923
expect(count, equals(3)); // 3 clock widget instances rebuilt.
@@ -4551,7 +4552,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
45514552
screenshot12,
45524553
matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'),
45534554
);
4554-
});
4555+
}, skip: impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/143616
45554556

45564557
group('layout explorer', () {
45574558
const String group = 'test-group';

0 commit comments

Comments
 (0)