Unverified Commit bb1c7a6c authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[framework] Skip 5 failing framework tests. (#143618)

Part of https://github.com/flutter/flutter/issues/143616
parent e0f126a4
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io' as io;
import 'package:flutter/foundation.dart';
/// Whether or not Flutter CI has configured Impeller for this test run.
///
/// This is intended only to be used for a migration effort to enable Impeller
/// on Flutter CI.
///
/// See also: https://github.com/flutter/flutter/issues/143616
bool get impellerEnabled {
if (kIsWeb) {
return false;
}
return io.Platform.environment.containsKey('FLUTTER_TEST_IMPELLER');
}
...@@ -8,6 +8,8 @@ import 'dart:ui' as ui; ...@@ -8,6 +8,8 @@ import 'dart:ui' as ui;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../impeller_test_helpers.dart';
const double _crispText = 100.0; // this font size is selected to avoid needing any antialiasing. const double _crispText = 100.0; // this font size is selected to avoid needing any antialiasing.
const String _expText = 'Éxp'; // renders in the test font as: const String _expText = 'Éxp'; // renders in the test font as:
...@@ -38,7 +40,7 @@ void main() { ...@@ -38,7 +40,7 @@ void main() {
const Offset(799, 599): const Color(0x00000000), // the background const Offset(799, 599): const Color(0x00000000), // the background
}, },
); );
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently. }, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
testWidgets('Default text color', (WidgetTester tester) async { testWidgets('Default text color', (WidgetTester tester) async {
await tester.pumpWidget(const ColoredBox( await tester.pumpWidget(const ColoredBox(
...@@ -63,7 +65,7 @@ void main() { ...@@ -63,7 +65,7 @@ void main() {
const Offset(799, 599): const Color(0xFFABCDEF), // the background const Offset(799, 599): const Color(0xFFABCDEF), // the background
}, },
); );
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently. }, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
testWidgets('Default text selection color', (WidgetTester tester) async { testWidgets('Default text selection color', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
...@@ -118,7 +120,7 @@ void main() { ...@@ -118,7 +120,7 @@ void main() {
const Offset(799, 599): const Color(0xFFFFFFFF), // the background const Offset(799, 599): const Color(0xFFFFFFFF), // the background
}, },
); );
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently. }, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
} }
Color _getPixel(ByteData bytes, int x, int y, int width) { Color _getPixel(ByteData bytes, int x, int y, int width) {
......
...@@ -15,6 +15,8 @@ import 'package:flutter/rendering.dart'; ...@@ -15,6 +15,8 @@ import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
import '../impeller_test_helpers.dart';
void main() { void main() {
testWidgets('SnapshotWidget can rasterize child', (WidgetTester tester) async { testWidgets('SnapshotWidget can rasterize child', (WidgetTester tester) async {
final SnapshotController controller = SnapshotController(allowSnapshotting: true); final SnapshotController controller = SnapshotController(allowSnapshotting: true);
...@@ -325,7 +327,7 @@ void main() { ...@@ -325,7 +327,7 @@ void main() {
await expectLater(find.byKey(repaintBoundaryKey), matchesReferenceImage(imageWhenDisabled)); await expectLater(find.byKey(repaintBoundaryKey), matchesReferenceImage(imageWhenDisabled));
}, },
skip: kIsWeb); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689 skip: kIsWeb || impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689
test('SnapshotPainter dispatches memory events', () async { test('SnapshotPainter dispatches memory events', () async {
await expectLater( await expectLater(
......
...@@ -21,6 +21,7 @@ import 'package:flutter/rendering.dart'; ...@@ -21,6 +21,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker/leak_tracker.dart'; import 'package:leak_tracker/leak_tracker.dart';
import '../impeller_test_helpers.dart';
import 'widget_inspector_test_utils.dart'; import 'widget_inspector_test_utils.dart';
// Start of block of code where widget creation location line numbers and // Start of block of code where widget creation location line numbers and
...@@ -3869,7 +3870,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ...@@ -3869,7 +3870,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
_CreationLocation location = knownLocations[id]!; _CreationLocation location = knownLocations[id]!;
expect(location.file, equals(file)); expect(location.file, equals(file));
// ClockText widget. // ClockText widget.
expect(location.line, equals(56)); expect(location.line, equals(57));
expect(location.column, equals(9)); expect(location.column, equals(9));
expect(location.name, equals('ClockText')); expect(location.name, equals('ClockText'));
expect(count, equals(1)); expect(count, equals(1));
...@@ -3879,7 +3880,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ...@@ -3879,7 +3880,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
location = knownLocations[id]!; location = knownLocations[id]!;
expect(location.file, equals(file)); expect(location.file, equals(file));
// Text widget in _ClockTextState build method. // Text widget in _ClockTextState build method.
expect(location.line, equals(94)); expect(location.line, equals(95));
expect(location.column, equals(12)); expect(location.column, equals(12));
expect(location.name, equals('Text')); expect(location.name, equals('Text'));
expect(count, equals(1)); expect(count, equals(1));
...@@ -3906,7 +3907,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ...@@ -3906,7 +3907,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
location = knownLocations[id]!; location = knownLocations[id]!;
expect(location.file, equals(file)); expect(location.file, equals(file));
// ClockText widget. // ClockText widget.
expect(location.line, equals(56)); expect(location.line, equals(57));
expect(location.column, equals(9)); expect(location.column, equals(9));
expect(location.name, equals('ClockText')); expect(location.name, equals('ClockText'));
expect(count, equals(3)); // 3 clock widget instances rebuilt. expect(count, equals(3)); // 3 clock widget instances rebuilt.
...@@ -3916,7 +3917,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ...@@ -3916,7 +3917,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
location = knownLocations[id]!; location = knownLocations[id]!;
expect(location.file, equals(file)); expect(location.file, equals(file));
// Text widget in _ClockTextState build method. // Text widget in _ClockTextState build method.
expect(location.line, equals(94)); expect(location.line, equals(95));
expect(location.column, equals(12)); expect(location.column, equals(12));
expect(location.name, equals('Text')); expect(location.name, equals('Text'));
expect(count, equals(3)); // 3 clock widget instances rebuilt. expect(count, equals(3)); // 3 clock widget instances rebuilt.
...@@ -4551,7 +4552,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ...@@ -4551,7 +4552,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
screenshot12, screenshot12,
matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'), matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'),
); );
}); }, skip: impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/143616
group('layout explorer', () { group('layout explorer', () {
const String group = 'test-group'; const String group = 'test-group';
......
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