mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix skwasm tests (#145570)
Skwasm tests are now running as `bringup: true` in postsubmit, but failing. Let's get them fixed.
This commit is contained in:
parent
6f9fff1f7c
commit
51e70fa16b
8
.ci.yaml
8
.ci.yaml
@ -1730,7 +1730,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_0
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1753,7 +1752,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_1
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1776,7 +1774,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_2
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1799,7 +1796,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_3
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1822,7 +1818,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_4
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1845,7 +1840,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_5
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1868,7 +1862,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_6
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -1891,7 +1884,6 @@ targets:
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_skwasm_tests_7_last
|
||||
bringup: true
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
properties:
|
||||
|
||||
@ -171,6 +171,17 @@ const Map<String, List<String>> kWebTestFileKnownFailures = <String, List<String
|
||||
'test/cupertino/scaffold_test.dart',
|
||||
'test/rendering/platform_view_test.dart',
|
||||
],
|
||||
'skwasm': <String>[
|
||||
// These tests are not compilable on the web due to dependencies on
|
||||
// VM-specific functionality.
|
||||
'test/services/message_codecs_vm_test.dart',
|
||||
'test/examples/sector_layout_test.dart',
|
||||
|
||||
// These tests are broken and need to be fixed.
|
||||
// TODO(jacksongardner): https://github.com/flutter/flutter/issues/71604
|
||||
'test/material/text_field_test.dart',
|
||||
'test/widgets/performance_overlay_test.dart',
|
||||
],
|
||||
};
|
||||
|
||||
const String kTestHarnessShardName = 'test_harness_tests';
|
||||
|
||||
@ -8,3 +8,10 @@
|
||||
bool get isCanvasKit {
|
||||
throw UnimplementedError('isCanvasKit is not implemented for dart:io.');
|
||||
}
|
||||
|
||||
/// The dart:io implementation of [isSkwasm].
|
||||
///
|
||||
/// This bool shouldn't be used outside of web.
|
||||
bool get isSkwasm {
|
||||
throw UnimplementedError('isSkwasm is not implemented for dart:io.');
|
||||
}
|
||||
|
||||
@ -4,10 +4,16 @@
|
||||
|
||||
import 'dart:js_interop';
|
||||
|
||||
// This value is set by the engine. It is used to determine if the application is
|
||||
// using canvaskit.
|
||||
// These values are set by the engine. They are used to determine if the
|
||||
// application is using canvaskit or skwasm.
|
||||
@JS('window.flutterCanvasKit')
|
||||
external JSAny? get _windowFlutterCanvasKit;
|
||||
|
||||
@JS('window._flutter_skwasmInstance')
|
||||
external JSAny? get _skwasmInstance;
|
||||
|
||||
/// The web implementation of [isCanvasKit]
|
||||
bool get isCanvasKit => _windowFlutterCanvasKit != null;
|
||||
|
||||
/// The web implementation of [isSkwasm]
|
||||
bool get isSkwasm => _skwasmInstance != null;
|
||||
|
||||
@ -9,3 +9,13 @@ import '_capabilities_io.dart'
|
||||
///
|
||||
/// Only to be used for web.
|
||||
bool get isCanvasKit => capabilities.isCanvasKit;
|
||||
|
||||
/// Returns true if the application is using Skwasm.
|
||||
///
|
||||
/// Only to be used for web.
|
||||
bool get isSkwasm => capabilities.isSkwasm;
|
||||
|
||||
/// Returns true if the application is using CanvasKit or Skwasm.
|
||||
///
|
||||
/// Only to be used for web.
|
||||
bool get isSkiaWeb => isCanvasKit || isSkwasm;
|
||||
|
||||
@ -78,3 +78,15 @@ const double precisionErrorTolerance = 1e-10;
|
||||
/// * [dart:io.Platform], a way to find out the browser's platform that is not
|
||||
/// overridable in tests.
|
||||
const bool kIsWeb = bool.fromEnvironment('dart.library.js_util');
|
||||
|
||||
/// A constant that is true if the application was compiled to WebAssembly.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [defaultTargetPlatform], which is used by themes to find out which
|
||||
/// platform the application is running on (or, in the case of a web app,
|
||||
/// which platform the application's browser is running in). Can be overridden
|
||||
/// in tests with [debugDefaultTargetPlatformOverride].
|
||||
/// * [dart:io.Platform], a way to find out the browser's platform that is not
|
||||
/// overridable in tests.
|
||||
const bool kIsWasm = kIsWeb && bool.fromEnvironment('dart.library.ffi');
|
||||
|
||||
@ -89,7 +89,9 @@ class StackFrame {
|
||||
///
|
||||
/// Returns null if format is not as expected.
|
||||
static StackFrame? _tryParseWebFrame(String line) {
|
||||
if (kDebugMode) {
|
||||
// dart2wasm doesn't emit stack frames in the same way DDC does, so we need
|
||||
// to do the less clever non-debug path here when compiled to wasm.
|
||||
if (kDebugMode && !kIsWasm) {
|
||||
return _tryParseWebDebugFrame(line);
|
||||
} else {
|
||||
return _tryParseWebNonDebugFrame(line);
|
||||
|
||||
@ -117,7 +117,7 @@ class NetworkImage
|
||||
|
||||
// We use a different method when headers are set because the
|
||||
// `ui_web.createImageCodecFromUrl` method is not capable of handling headers.
|
||||
if (isCanvasKit || containsNetworkImageHeaders) {
|
||||
if (isSkiaWeb || containsNetworkImageHeaders) {
|
||||
final Completer<web.XMLHttpRequest> completer =
|
||||
Completer<web.XMLHttpRequest>();
|
||||
final web.XMLHttpRequest request = httpRequestFactory();
|
||||
|
||||
@ -87,7 +87,7 @@ abstract class ShaderWarmUp {
|
||||
await warmUpOnCanvas(canvas);
|
||||
final ui.Picture picture = recorder.endRecording();
|
||||
assert(debugCaptureShaderWarmUpPicture(picture));
|
||||
if (!kIsWeb || isCanvasKit) { // Picture.toImage is not yet implemented on the web.
|
||||
if (!kIsWeb || isSkiaWeb) { // Picture.toImage is not implemented on the html renderer.
|
||||
TimelineTask? debugShaderWarmUpTask;
|
||||
if (!kReleaseMode) {
|
||||
debugShaderWarmUpTask = TimelineTask()..start('Warm-up shader');
|
||||
|
||||
@ -1476,7 +1476,7 @@ class TextPainter {
|
||||
);
|
||||
} else {
|
||||
// Fall back to glyphInfo. This should only happen when using the HTML renderer.
|
||||
assert(kIsWeb && !isCanvasKit);
|
||||
assert(kIsWeb && !isSkiaWeb);
|
||||
final Rect graphemeBounds = glyphInfo.graphemeClusterLayoutBounds;
|
||||
final double dx = switch (glyphInfo.writingDirection) {
|
||||
TextDirection.ltr => anchorToLeadingEdge ? graphemeBounds.left : graphemeBounds.right,
|
||||
|
||||
@ -346,7 +346,7 @@ void main() {
|
||||
// regular font. However, when using the test font, "Cancel" becomes 2 lines which
|
||||
// is why the height we're verifying for "Cancel" is larger than "OK".
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getSize(find.text('The Title')), equals(const Size(270.0, 132.0)));
|
||||
}
|
||||
expect(tester.getTopLeft(find.text('The Title')), equals(const Offset(265.0, 80.0 + 24.0)));
|
||||
|
||||
@ -278,7 +278,7 @@ void main() {
|
||||
r'TransformLayer#[0-9a-f]{5}\n'
|
||||
r' owner: RenderView#[0-9a-f]{5}\n'
|
||||
r' creator: RenderView\n'
|
||||
r' engine layer: (TransformEngineLayer|PersistedTransform)#[0-9a-f]{5}\n'
|
||||
r' engine layer: (TransformLayer|TransformEngineLayer|PersistedTransform)#[0-9a-f]{5}\n'
|
||||
r' handles: 1\n'
|
||||
r' offset: Offset\(0\.0, 0\.0\)\n'
|
||||
r' transform:\n'
|
||||
|
||||
@ -41,12 +41,19 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('Parses web stack', () {
|
||||
expect(
|
||||
StackFrame.fromStackString(webStackTrace),
|
||||
webStackTraceFrames,
|
||||
);
|
||||
});
|
||||
test(
|
||||
'Parses web stack',
|
||||
// Wasm stacks are not reliable, even in debug mode, so the stack
|
||||
// parser doesn't do the standard debug stack parsing this test is
|
||||
// expecting here.
|
||||
skip: kIsWasm, // [intended] See comments above
|
||||
() {
|
||||
expect(
|
||||
StackFrame.fromStackString(webStackTrace),
|
||||
webStackTraceFrames,
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
test('Parses ...', () {
|
||||
expect(
|
||||
|
||||
@ -565,7 +565,7 @@ void main() {
|
||||
tester.getTopLeft(find.text('Licenses')),
|
||||
const Offset(16.0 + safeareaPadding, 14.0 + safeareaPadding),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('LicensePage returns early if unmounted', (WidgetTester tester) async {
|
||||
final Completer<LicenseEntry> licenseCompleter = Completer<LicenseEntry>();
|
||||
@ -1560,7 +1560,7 @@ void main() {
|
||||
// If the layout width is less than 840.0 pixels, nested layout is
|
||||
// used which positions license page title at the top center.
|
||||
Offset titleOffset = tester.getCenter(find.text(title));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(titleOffset, Offset(defaultSize.width / 2, 96.0));
|
||||
}
|
||||
expect(tester.getCenter(find.byType(ListView)), Offset(defaultSize.width / 2, 328.0));
|
||||
@ -1692,7 +1692,7 @@ void main() {
|
||||
// If the layout width is less than 840.0 pixels, nested layout is
|
||||
// used which positions license page title at the top center.
|
||||
Offset titleOffset = tester.getCenter(find.text(title));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(titleOffset, Offset(defaultSize.width / 2, 96.0));
|
||||
}
|
||||
expect(tester.getCenter(find.byType(ListView)), Offset(defaultSize.width / 2, 328.0));
|
||||
|
||||
@ -273,7 +273,7 @@ void main() {
|
||||
await tester.pumpWidget(buildAppBar(textScaleFactor: 3.0));
|
||||
expect(tester.getRect(expandedTitle).height, 43.0);
|
||||
verifyTextNotClipped(expandedTitle, tester);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('SliverAppBar.large expanded title has upper limit on text scaling', (WidgetTester tester) async {
|
||||
const String title = 'Large AppBar';
|
||||
@ -312,7 +312,7 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(buildAppBar(textScaleFactor: 3.0));
|
||||
expect(tester.getRect(expandedTitle).height, closeTo(48.0, 0.1));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('SliverAppBar.medium expanded title position is adjusted with textScaleFactor', (WidgetTester tester) async {
|
||||
const String title = 'Medium AppBar';
|
||||
@ -354,7 +354,7 @@ void main() {
|
||||
await tester.pumpWidget(buildAppBar(textScaleFactor: 3.0));
|
||||
expect(tester.getBottomLeft(expandedTitle).dy, 107.0);
|
||||
verifyTextNotClipped(expandedTitle, tester);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('SliverAppBar.large expanded title position is adjusted with textScaleFactor', (WidgetTester tester) async {
|
||||
const String title = 'Large AppBar';
|
||||
@ -1361,7 +1361,7 @@ void main() {
|
||||
// Test the expanded title is positioned correctly.
|
||||
final Offset titleOffset = tester.getBottomLeft(expandedTitle);
|
||||
expect(titleOffset.dx, 16.0);
|
||||
if (!kIsWeb || isCanvasKit) {
|
||||
if (!kIsWeb || isSkiaWeb) {
|
||||
expect(titleOffset.dy, 96.0);
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Badge)), const Size(24, 24)); // default Icon size
|
||||
expect(tester.getTopLeft(find.byType(Badge)), Offset.zero);
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getTopLeft(find.text('0')), const Offset(16, -4));
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Badge)), const Size(24, 24)); // default Icon size
|
||||
expect(tester.getTopLeft(find.byType(Badge)), Offset.zero);
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getTopLeft(find.text('0')), const Offset(0, -4));
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ void main() {
|
||||
|
||||
// x = alignment.start + padding.left
|
||||
// y = alignment.top
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getTopLeft(find.text('0')), const Offset(16, -4));
|
||||
}
|
||||
|
||||
|
||||
@ -261,23 +261,23 @@ void main() {
|
||||
await tester.pumpWidget(buildApp(textScaler: TextScaler.noScaling));
|
||||
expect(find.text(label), findsOneWidget);
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getSize(find.text(label)), const Size(14.25, 20.0));
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(1.1)));
|
||||
await tester.pumpAndSettle();
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(_sizeAlmostEqual(tester.getSize(find.text(label)), const Size(15.65, 22.0)), true);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(1.5)));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(_sizeAlmostEqual(tester.getSize(find.text(label)), const Size(21.25, 30)), true);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(4)));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(_sizeAlmostEqual(tester.getSize(find.text(label)), const Size(21.25, 30)), true);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1882,7 +1882,7 @@ void main() {
|
||||
expect(find.text(label), findsOneWidget);
|
||||
await tester.longPress(find.text(label));
|
||||
expect(tester.getSize(find.text(label).last).height, equals(80.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Different behaviour of tool tip in BottomNavigationBarItem', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
@ -2889,7 +2889,7 @@ void main() {
|
||||
);
|
||||
expect(tester.getRect(find.byKey(icon0)), Rect.fromLTRB(100.0, iconTop, 300.0, iconTop + iconHeight));
|
||||
expect(tester.getRect(find.byKey(icon1)), Rect.fromLTRB(500.0, iconTop, 700.0, iconTop + iconHeight));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - BottomNavigationBar centered landscape layout', (WidgetTester tester) async {
|
||||
final Key icon0 = UniqueKey();
|
||||
@ -3008,7 +3008,7 @@ void main() {
|
||||
);
|
||||
expect(tester.getRect(find.byKey(icon0)), Rect.fromLTRB(150.0, iconTop, 350.0, iconTop + iconHeight));
|
||||
expect(tester.getRect(find.byKey(icon1)), Rect.fromLTRB(450.0, iconTop, 650.0, iconTop + iconHeight));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - BottomNavigationBar linear landscape layout', (WidgetTester tester) async {
|
||||
final Key icon0 = UniqueKey();
|
||||
@ -3123,7 +3123,7 @@ void main() {
|
||||
);
|
||||
expect(tester.getRect(find.byKey(icon0)), Rect.fromLTRB(firstItemLeft, iconTop, firstItemLeft + iconWidth, iconTop + iconHeight));
|
||||
expect(tester.getRect(find.byKey(icon1)), Rect.fromLTRB(secondItemLeft, iconTop, secondItemLeft + iconWidth, iconTop + iconHeight));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('BottomNavigationBar linear landscape layout label RenderFlex overflow',(WidgetTester tester) async {
|
||||
//Regression test for https://github.com/flutter/flutter/issues/112163
|
||||
|
||||
@ -662,7 +662,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Text)).width, closeTo(40.4, 0.01));
|
||||
expect(tester.getSize(find.byType(Text)).height, equals(14.0));
|
||||
expect(tester.getSize(find.byType(Chip)), const Size(800.0, 48.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Chip responds to materialTapTargetSize', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
@ -708,7 +708,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Chip).first).height, equals(48.0));
|
||||
expect(tester.getSize(find.byType(Chip).last).width, closeTo(48.1, 0.01));
|
||||
expect(tester.getSize(find.byType(Chip).last).height, equals(38.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Delete button tap target is the right proportion of the chip', (WidgetTester tester) async {
|
||||
final UniqueKey deleteKey = UniqueKey();
|
||||
@ -962,7 +962,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Chip).first).height, equals(78.0));
|
||||
expect(tester.getSize(find.byType(Chip).last).width, closeTo(138.59, 0.01));
|
||||
expect(tester.getSize(find.byType(Chip).last).height, equals(48.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Labels can be non-text widgets', (WidgetTester tester) async {
|
||||
final Key keyA = GlobalKey();
|
||||
@ -1017,7 +1017,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(Chip).first).width, moreOrLessEquals(138.5, epsilon: 0.1));
|
||||
expect(tester.getSize(find.byType(Chip).first).height, equals(48.0));
|
||||
expect(tester.getSize(find.byType(Chip).last), const Size(60.0, 48.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Avatars can be non-circle avatar widgets', (WidgetTester tester) async {
|
||||
final Key keyA = GlobalKey();
|
||||
@ -1381,7 +1381,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(RawChip)).height, equals(48.0));
|
||||
expect(tester.getTopLeft(find.byKey(labelKey)), equals(const Offset(17.0, 14.0)));
|
||||
expect(find.byKey(avatarKey), findsNothing);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Delete button drawer works as expected on RawChip', (WidgetTester tester) async {
|
||||
const Key labelKey = Key('label');
|
||||
@ -1628,7 +1628,7 @@ void main() {
|
||||
expect(tester.getSize(find.byType(RawChip)).height, equals(48.0));
|
||||
expect(tester.getTopLeft(find.byKey(labelKey)), equals(const Offset(17.0, 14.0)));
|
||||
expect(find.byKey(deleteButtonKey), findsNothing);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Delete button takes up at most half of the chip', (WidgetTester tester) async {
|
||||
final UniqueKey chipKey = UniqueKey();
|
||||
@ -2283,7 +2283,7 @@ void main() {
|
||||
// Simulate a tap on the label to select the chip.
|
||||
await tester.tap(find.byKey(labelKey));
|
||||
expect(selected, equals(true));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isCanvasKit ? 3 : 1));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isSkiaWeb ? 3 : 1));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
expect(getSelectProgress(tester), moreOrLessEquals(0.002, epsilon: 0.01));
|
||||
@ -2302,7 +2302,7 @@ void main() {
|
||||
// Simulate another tap on the label to deselect the chip.
|
||||
await tester.tap(find.byKey(labelKey));
|
||||
expect(selected, equals(false));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isCanvasKit ? 3 : 1));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isSkiaWeb ? 3 : 1));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 20));
|
||||
expect(getSelectProgress(tester), moreOrLessEquals(0.875, epsilon: 0.01));
|
||||
@ -2316,7 +2316,7 @@ void main() {
|
||||
expect(getSelectProgress(tester), equals(0.0));
|
||||
expect(getAvatarDrawerProgress(tester), equals(1.0));
|
||||
expect(getDeleteDrawerProgress(tester), equals(0.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Selection without avatar works as expected on RawChip', (WidgetTester tester) async {
|
||||
bool selected = false;
|
||||
@ -2435,7 +2435,7 @@ void main() {
|
||||
// Simulate a tap on the label to select the chip.
|
||||
await tester.tap(find.byKey(labelKey));
|
||||
expect(selected, equals(true));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isCanvasKit ? 3 : 1));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isSkiaWeb ? 3 : 1));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
expect(getSelectProgress(tester), moreOrLessEquals(0.002, epsilon: 0.01));
|
||||
@ -2455,7 +2455,7 @@ void main() {
|
||||
// Simulate another tap on the label to deselect the chip.
|
||||
await tester.tap(find.byKey(labelKey));
|
||||
expect(selected, equals(false));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isCanvasKit ? 3 : 1));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isSkiaWeb ? 3 : 1));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 20));
|
||||
expect(getSelectProgress(tester), moreOrLessEquals(0.875, epsilon: 0.01));
|
||||
@ -2469,7 +2469,7 @@ void main() {
|
||||
expect(getSelectProgress(tester), equals(0.0));
|
||||
expect(getAvatarDrawerProgress(tester), equals(0.0));
|
||||
expect(getDeleteDrawerProgress(tester), equals(0.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Activation works as expected on RawChip', (WidgetTester tester) async {
|
||||
bool selected = false;
|
||||
@ -2569,7 +2569,7 @@ void main() {
|
||||
|
||||
await tester.tap(find.byKey(labelKey));
|
||||
expect(selected, equals(true));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isCanvasKit ? 3 : 1));
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(kIsWeb && isSkiaWeb ? 3 : 1));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
expect(getSelectProgress(tester), moreOrLessEquals(0.002, epsilon: 0.01));
|
||||
@ -2584,7 +2584,7 @@ void main() {
|
||||
expect(getAvatarDrawerProgress(tester), equals(1.0));
|
||||
expect(getDeleteDrawerProgress(tester), equals(0.0));
|
||||
await tester.pumpAndSettle();
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Chip uses ThemeData chip theme if present', (WidgetTester tester) async {
|
||||
final ThemeData theme = ThemeData(chipTheme: const ChipThemeData(backgroundColor: Color(0xffff0000)));
|
||||
@ -2755,7 +2755,7 @@ void main() {
|
||||
|
||||
expect(tester.getSize(find.byKey(key2)).width, moreOrLessEquals(90.4, epsilon: 0.1));
|
||||
expect(tester.getSize(find.byKey(key2)).height, equals(38.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Chip uses the right theme colors for the right components', (WidgetTester tester) async {
|
||||
final ThemeData themeData = ThemeData(
|
||||
@ -4656,7 +4656,7 @@ void main() {
|
||||
box = tester.getRect(find.byKey(key));
|
||||
expect(box.size.width, moreOrLessEquals(130.4, epsilon: 0.1));
|
||||
expect(box.size.height, equals(24.0 + 16.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Chip delete button tooltip is disabled if deleteButtonTooltipMessage is empty', (WidgetTester tester) async {
|
||||
final UniqueKey deleteButtonKey = UniqueKey();
|
||||
|
||||
@ -886,7 +886,7 @@ void main() {
|
||||
final Offset subHeaderTextTopLeft = tester.getTopLeft(subHeaderText);
|
||||
final Offset dividerTopRight = tester.getTopRight(divider);
|
||||
expect(subHeaderTextTopLeft.dx, dividerTopRight.dx + 24.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(subHeaderTextTopLeft.dy, dialogTopLeft.dy + 16.0);
|
||||
}
|
||||
|
||||
@ -902,7 +902,7 @@ void main() {
|
||||
final Offset calendarPageViewTopLeft = tester.getTopLeft(calendarPageView);
|
||||
final Offset subHeaderTextBottomLeft = tester.getBottomLeft(subHeaderText);
|
||||
expect(calendarPageViewTopLeft.dx, dividerTopRight.dx);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(calendarPageViewTopLeft.dy, subHeaderTextBottomLeft.dy + 16.0);
|
||||
}
|
||||
|
||||
@ -964,7 +964,7 @@ void main() {
|
||||
final Offset headerTextTextTopLeft = tester.getTopLeft(headerText);
|
||||
final Offset helpTextBottomLeft = tester.getBottomLeft(helpText);
|
||||
expect(headerTextTextTopLeft.dx, dialogTopLeft.dx + 24.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(headerTextTextTopLeft.dy, helpTextBottomLeft.dy + 28.0);
|
||||
}
|
||||
|
||||
@ -986,7 +986,7 @@ void main() {
|
||||
final Offset subHeaderTextTopLeft = tester.getTopLeft(subHeaderText);
|
||||
final Offset dividerBottomLeft = tester.getBottomLeft(divider);
|
||||
expect(subHeaderTextTopLeft.dx, dialogTopLeft.dx + 24.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(subHeaderTextTopLeft.dy, dividerBottomLeft.dy + 16.0);
|
||||
}
|
||||
|
||||
@ -1011,7 +1011,7 @@ void main() {
|
||||
final Offset calendarPageViewTopLeft = tester.getTopLeft(calendarPageView);
|
||||
final Offset subHeaderTextBottomLeft = tester.getBottomLeft(subHeaderText);
|
||||
expect(calendarPageViewTopLeft.dx, dialogTopLeft.dx);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(calendarPageViewTopLeft.dy, subHeaderTextBottomLeft.dy + 16.0);
|
||||
}
|
||||
|
||||
|
||||
@ -135,18 +135,18 @@ void main() {
|
||||
find.widgetWithIcon(IconButton, Icons.edit_outlined),
|
||||
);
|
||||
expect(saveButtonBottomLeft.dx, moreOrLessEquals(711.6, epsilon: 1e-5));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(saveButtonBottomLeft.dy, helpTextTopLeft.dy);
|
||||
}
|
||||
expect(entryButtonBottomLeft.dx, saveButtonBottomLeft.dx - 48.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(entryButtonBottomLeft.dy, helpTextTopLeft.dy);
|
||||
}
|
||||
|
||||
// Test help text position.
|
||||
final Offset helpTextBottomLeft = tester.getBottomLeft(helpText);
|
||||
expect(helpTextBottomLeft.dx, 72.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(helpTextBottomLeft.dy, closeButtonBottomRight.dy + 20.0);
|
||||
}
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ void main() {
|
||||
find.descendant(of: find.byType(Dialog), matching: find.byType(Material)),
|
||||
);
|
||||
expect(bottomLeft.dx, 480.0);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(bottomLeft.dy, 124.0);
|
||||
}
|
||||
});
|
||||
|
||||
@ -905,7 +905,7 @@ void main() {
|
||||
// Test the delete button icon.
|
||||
expect(tester.getSize(find.byIcon(Icons.clear)), const Size(18.0, 18.0));
|
||||
expect(getIconData(tester).color, theme.colorScheme.onSurfaceVariant);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - FilterChip supports delete button', (WidgetTester tester) async {
|
||||
final ThemeData theme = ThemeData(useMaterial3: false);
|
||||
|
||||
@ -130,7 +130,7 @@ void main() {
|
||||
await tester.pump(const Duration(milliseconds: 200)); // wait for splash to be well under way
|
||||
|
||||
final RenderBox box = Material.of(tester.element(find.byType(InkWell))) as RenderBox;
|
||||
if (kIsWeb && isCanvasKit) {
|
||||
if (kIsWeb && isSkiaWeb) {
|
||||
expect(
|
||||
box,
|
||||
paints
|
||||
@ -164,7 +164,7 @@ void main() {
|
||||
);
|
||||
|
||||
await gesture.up();
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('The InkWell widget renders an ink ripple', (WidgetTester tester) async {
|
||||
const Color highlightColor = Color(0xAAFF0000);
|
||||
|
||||
@ -134,11 +134,11 @@ void main() {
|
||||
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('test')));
|
||||
final MaterialInkController material = Material.of(tester.element(find.text('test')));
|
||||
await tester.pump(const Duration(milliseconds: 200));
|
||||
expect(material, paintsExactlyCountTimes(#drawRect, (kIsWeb && isCanvasKit ? 1 : 2)));
|
||||
expect(material, paintsExactlyCountTimes(#drawRect, (kIsWeb && isSkiaWeb ? 1 : 2)));
|
||||
await gesture.up();
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/136441.
|
||||
testWidgets('PageView item can dispose when widget with NoSplash.splashFactory is tapped', (WidgetTester tester) async {
|
||||
|
||||
@ -154,7 +154,7 @@ void main() {
|
||||
await tester.pumpWidget(buildFrame(isTwoLine: true, textScaler: const TextScaler.linear(4.0)));
|
||||
testChildren();
|
||||
testHorizontalGeometry();
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
testVerticalGeometry(192.0);
|
||||
}
|
||||
|
||||
@ -162,14 +162,14 @@ void main() {
|
||||
await tester.pumpWidget(buildFrame(isTwoLine: true, textScaler: const TextScaler.linear(0.5), subtitleScaler: const TextScaler.linear(4.0)));
|
||||
testChildren();
|
||||
testHorizontalGeometry();
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
testVerticalGeometry(108.0);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildFrame(isThreeLine: true, textScaler: const TextScaler.linear(4.0)));
|
||||
testChildren();
|
||||
testHorizontalGeometry();
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
testVerticalGeometry(192.0);
|
||||
}
|
||||
});
|
||||
@ -505,7 +505,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
if (kIsWeb && !isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (kIsWeb && !isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
return;
|
||||
}
|
||||
const double height = 300;
|
||||
|
||||
@ -81,7 +81,7 @@ void main() {
|
||||
expect(tester.getRect(findMenuPanels().first).size, equals(const Size(600.0, 60.0)));
|
||||
|
||||
// MenuTheme affects menus.
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(tester.getRect(findMenuPanels().at(1)), equals(const Rect.fromLTRB(104.0, 54.0, 204.0, 154.0)));
|
||||
expect(tester.getRect(findMenuPanels().at(1)).size, equals(const Size(100.0, 100.0)));
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ void main() {
|
||||
await tester.longPress(find.text(label));
|
||||
expect(find.text(label), findsNWidgets(2));
|
||||
|
||||
if (!kIsWeb || isCanvasKit) {
|
||||
if (!kIsWeb || isSkiaWeb) {
|
||||
expect(tester.getSize(find.text(label).last), const Size(14.25, 20.0));
|
||||
}
|
||||
// The duration is needed to ensure the tooltip disappears.
|
||||
@ -420,7 +420,7 @@ void main() {
|
||||
expect(find.text(label), findsOneWidget);
|
||||
await tester.longPress(find.text(label));
|
||||
|
||||
if (!kIsWeb || isCanvasKit) {
|
||||
if (!kIsWeb || isSkiaWeb) {
|
||||
expect(tester.getSize(find.text(label).last), const Size(56.25, 80.0));
|
||||
}
|
||||
});
|
||||
@ -467,25 +467,25 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: TextScaler.noScaling));
|
||||
expect(find.text(label), findsOneWidget);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect( _sizeAlmostEqual(tester.getSize(find.text(label)), const Size(12.5, 16.0)), true);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(1.1)));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect( _sizeAlmostEqual(tester.getSize(find.text(label)), const Size(13.7, 18.0)), true);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(1.3)));
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect( _sizeAlmostEqual(tester.getSize(find.text(label)), const Size(16.1, 21.0)), true);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(buildApp(textScaler: const TextScaler.linear(4)));
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect( _sizeAlmostEqual(tester.getSize(find.text(label)), const Size(16.1, 21.0)), true);
|
||||
}
|
||||
});
|
||||
@ -891,7 +891,7 @@ void main() {
|
||||
color: const Color(0x0a000000),
|
||||
)
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material3 - Navigation indicator ripple golden test', (WidgetTester tester) async {
|
||||
// This is a regression test for https://github.com/flutter/flutter/issues/117420.
|
||||
|
||||
@ -481,7 +481,7 @@ void main() {
|
||||
await tester.tap(find.text('Accessible'));
|
||||
expect(selectedIndex, 1);
|
||||
|
||||
tester.pumpAndSettle();
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -540,7 +540,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -555,7 +555,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -570,7 +570,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -638,7 +638,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -653,7 +653,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -668,7 +668,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -736,7 +736,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -751,7 +751,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -766,7 +766,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeight + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -833,7 +833,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -848,7 +848,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -863,7 +863,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -931,7 +931,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -946,7 +946,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -961,7 +961,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -1029,7 +1029,7 @@ void main() {
|
||||
// The second destination is below the first with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox secondIconRenderBox = _iconRenderBox(tester, Icons.bookmark_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
secondIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -1044,7 +1044,7 @@ void main() {
|
||||
// The third destination is below the second with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox thirdIconRenderBox = _iconRenderBox(tester, Icons.star_border);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
thirdIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -1059,7 +1059,7 @@ void main() {
|
||||
// The fourth destination is below the third with some spacing.
|
||||
nextDestinationY += destinationHeightWithLabel + destinationSpacing;
|
||||
final RenderBox fourthIconRenderBox = _iconRenderBox(tester, Icons.hotel);
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(
|
||||
fourthIconRenderBox.localToGlobal(Offset.zero),
|
||||
equals(
|
||||
@ -2072,7 +2072,7 @@ void main() {
|
||||
expect(selectedIndex, 2);
|
||||
|
||||
// Wait for any pending shader compilation.
|
||||
tester.pumpAndSettle();
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
|
||||
testWidgets('onDestinationSelected is not called if null', (WidgetTester tester) async {
|
||||
@ -2090,7 +2090,7 @@ void main() {
|
||||
expect(selectedIndex, 0);
|
||||
|
||||
// Wait for any pending shader compilation.
|
||||
tester.pumpAndSettle();
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
|
||||
testWidgets('Changing destinations animate when [labelType]=selected', (WidgetTester tester) async {
|
||||
@ -2823,7 +2823,7 @@ void main() {
|
||||
color: const Color(0xffe8def8),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('NavigationRail indicator renders ripple - extended', (WidgetTester tester) async {
|
||||
// This is a regression test for https://github.com/flutter/flutter/issues/117126
|
||||
@ -3171,7 +3171,7 @@ void main() {
|
||||
color: const Color(0xffe8def8),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('NavigationRail indicator renders properly with large icon', (WidgetTester tester) async {
|
||||
// This is a regression test for https://github.com/flutter/flutter/issues/133799.
|
||||
@ -3274,7 +3274,7 @@ void main() {
|
||||
color: const Color(0xffe8def8),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('NavigationRail indicator renders properly when text direction is rtl', (WidgetTester tester) async {
|
||||
// This is a regression test for https://github.com/flutter/flutter/issues/134361.
|
||||
@ -3373,7 +3373,7 @@ void main() {
|
||||
color: const Color(0xffe8def8),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('NavigationRail indicator scale transform', (WidgetTester tester) async {
|
||||
int selectedIndex = 0;
|
||||
@ -3504,7 +3504,7 @@ void main() {
|
||||
expect(selectedIndex, 1);
|
||||
|
||||
// Wait for any pending shader compilation.
|
||||
tester.pumpAndSettle();
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
|
||||
testWidgets("Destination's label with the right opacity while disabled", (WidgetTester tester) async {
|
||||
@ -3603,7 +3603,7 @@ void main() {
|
||||
|
||||
inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures');
|
||||
expect(inkFeatures, paints..circle(color: Colors.transparent));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Navigation rail can have expanded widgets inside', (WidgetTester tester) async {
|
||||
await _pumpNavigationRail(
|
||||
@ -3745,7 +3745,7 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Destination spacing is correct - [labelType]=none (default), [textScaleFactor]=3.0', (WidgetTester tester) async {
|
||||
// Since the rail is icon only, its destinations should not be affected by
|
||||
@ -3815,7 +3815,7 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Destination spacing is correct - [labelType]=none (default), [textScaleFactor]=0.75', (WidgetTester tester) async {
|
||||
// Since the rail is icon only, its destinations should not be affected by
|
||||
@ -3885,7 +3885,7 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Destination spacing is correct - [labelType]=selected, [textScaleFactor]=1.0 (default)', (WidgetTester tester) async {
|
||||
await _pumpNavigationRail(
|
||||
|
||||
@ -1172,7 +1172,7 @@ void main() {
|
||||
|
||||
expect(tester.getSize(find.byType(OutlinedButton)), const Size(134.0, 48.0));
|
||||
expect(tester.getSize(find.byType(Text)), const Size(126.0, 42.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/122066
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/122066
|
||||
|
||||
testWidgets('OutlinedButton onPressed and onLongPress callbacks are distinctly recognized', (WidgetTester tester) async {
|
||||
bool didPressButton = false;
|
||||
|
||||
@ -2965,7 +2965,7 @@ void main() {
|
||||
await expectLater(find.byType(MaterialApp), matchesGoldenFile('m3_snack_bar.scaffold.nested.png'));
|
||||
final Offset snackBarTopRight = tester.getTopRight(find.byType(SnackBar));
|
||||
|
||||
if (!kIsWeb || isCanvasKit) { // https://github.com/flutter/flutter/issues/99933
|
||||
if (!kIsWeb || isSkiaWeb) { // https://github.com/flutter/flutter/issues/99933
|
||||
expect(snackBarTopRight.dy, 465.0);
|
||||
}
|
||||
});
|
||||
|
||||
@ -695,7 +695,7 @@ void main() {
|
||||
|
||||
expect(tester.getSize(find.byType(TextButton)), const Size(134.0, 48.0));
|
||||
expect(tester.getSize(find.byType(Text)), const Size(126.0, 42.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/61016
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/61016
|
||||
|
||||
testWidgets('TextButton size is configurable by ThemeData.materialTapTargetSize', (WidgetTester tester) async {
|
||||
Widget buildFrame(MaterialTapTargetSize tapTargetSize, Key key) {
|
||||
|
||||
@ -1370,7 +1370,7 @@ void main() {
|
||||
expect(firstToggleButtonDy, secondToggleButtonDy);
|
||||
expect(firstToggleButtonDy, closeTo(elevatedButtonDy - 1.7, 0.1));
|
||||
expect(firstToggleButtonDy, closeTo(textDy - 9.7, 0.1));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Directionality test', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
|
||||
@ -192,7 +192,7 @@ void main() {
|
||||
);
|
||||
expect(tip.size.height, equals(24.0)); // 14.0 height + 5.0 padding * 2 (top, bottom)
|
||||
expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)), equals(const Offset(10.0, 20.0)));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material3 - Does tooltip end up in the right place - top left', (WidgetTester tester) async {
|
||||
final GlobalKey<TooltipState> tooltipKey = GlobalKey<TooltipState>();
|
||||
@ -245,7 +245,7 @@ void main() {
|
||||
);
|
||||
expect(tip.size.height, equals(30.0)); // 20.0 height + 5.0 padding * 2 (top, bottom)
|
||||
expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)), equals(const Offset(10.0, 20.0)));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Does tooltip end up in the right place - center prefer above fits', (WidgetTester tester) async {
|
||||
final GlobalKey<TooltipState> tooltipKey = GlobalKey<TooltipState>();
|
||||
@ -533,7 +533,7 @@ void main() {
|
||||
expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)).dy, equals(310.0));
|
||||
expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dx, equals(790.0));
|
||||
expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dy, equals(330.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Material2 - Does tooltip end up in the right place - near the edge', (WidgetTester tester) async {
|
||||
final GlobalKey<TooltipState> tooltipKey = GlobalKey<TooltipState>();
|
||||
@ -646,7 +646,7 @@ void main() {
|
||||
expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)).dy, equals(310.0));
|
||||
expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dx, equals(790.0));
|
||||
expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dy, equals(330.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Tooltip should be fully visible when MediaQuery.viewInsets > 0', (WidgetTester tester) async {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/23666
|
||||
@ -1125,7 +1125,7 @@ void main() {
|
||||
final Container tooltipContainer = tester.firstWidget<Container>(_findTooltipContainer(tooltipText));
|
||||
expect(tooltipContainer.padding, const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0));
|
||||
}, variant: const TargetPlatformVariant(<TargetPlatform>{TargetPlatform.macOS, TargetPlatform.linux, TargetPlatform.windows}),
|
||||
skip: kIsWeb && !isCanvasKit, // https://github.com/flutter/flutter/issues/99933
|
||||
skip: kIsWeb && !isSkiaWeb, // https://github.com/flutter/flutter/issues/99933
|
||||
);
|
||||
|
||||
testWidgets('Material2 - Can tooltip decoration be customized', (WidgetTester tester) async {
|
||||
@ -2109,7 +2109,7 @@ void main() {
|
||||
_findTooltipContainer(tooltipText),
|
||||
);
|
||||
expect(tip.size.height, equals(88.0));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/99933
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/99933
|
||||
|
||||
testWidgets('Tooltip text displays with richMessage', (WidgetTester tester) async {
|
||||
final GlobalKey<TooltipState> tooltipKey = GlobalKey<TooltipState>();
|
||||
|
||||
@ -15,7 +15,7 @@ Future<void> main() async {
|
||||
debugCaptureShaderWarmUpImage = expectAsync1((ui.Image image) => true);
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
expect(shaderWarmUp.ranWarmUp, true);
|
||||
}, skip: kIsWeb && !isCanvasKit); // [intended] Testing only for canvasKit
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] Testing only for canvasKit
|
||||
}
|
||||
|
||||
class FakeShaderWarmUp extends ShaderWarmUp {
|
||||
|
||||
@ -164,7 +164,7 @@ void main() {
|
||||
final Offset caretOffset = painter.getOffsetForCaret(ui.TextPosition(offset: painter.text!.toPlainText().length), ui.Rect.zero);
|
||||
expect(caretOffset.dx, painter.width);
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter null text test', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -259,7 +259,7 @@ void main() {
|
||||
caretOffset = painter.getOffsetForCaret(const ui.TextPosition(offset: 23), ui.Rect.zero);
|
||||
expect(caretOffset.dx, 126); // end of string
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret emoji tests: single, long emoji', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/50563
|
||||
@ -277,7 +277,7 @@ void main() {
|
||||
// their lengths in code units are powers of 2, namely 4 and 8).
|
||||
checkCaretOffsetsLtr('🇺🇳');
|
||||
checkCaretOffsetsLtr('👩❤️👨');
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret emoji test: letters, then 1 emoji of 5 code units', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/50563
|
||||
@ -285,18 +285,18 @@ void main() {
|
||||
checkCaretOffsetsLtr('ab👩🚀');
|
||||
checkCaretOffsetsLtr('abc👩🚀');
|
||||
checkCaretOffsetsLtr('abcd👩🚀');
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret zalgo test', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/98516
|
||||
checkCaretOffsetsLtr('Z͉̳̺ͥͬ̾a̴͕̲̒̒͌̋ͪl̨͎̰̘͉̟ͤ̀̈̚͜g͕͔̤͖̟̒͝ͅo̵̡̡̼͚̐ͯ̅ͪ̆ͣ̚');
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret Devanagari test', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/118403
|
||||
checkCaretOffsetsLtrFromPieces(
|
||||
<String>['प्रा', 'प्त', ' ', 'व', 'र्ण', 'न', ' ', 'प्र', 'व्रु', 'ति']);
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret Devanagari test, full strength', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/118403
|
||||
@ -325,7 +325,7 @@ void main() {
|
||||
TextSpan(text: '👩🚀', style: TextStyle()),
|
||||
])),
|
||||
<double>[0, 14, 28, 42, 56, 70, 84, 112, 112, 112, 112, 112]);
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret emoji test RTL: letters next to emoji, as separate TextBoxes', () {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/122477
|
||||
@ -343,7 +343,7 @@ void main() {
|
||||
TextSpan(text: '👩🚀', style: TextStyle()),
|
||||
])),
|
||||
<double>[112, 98, 84, 70, 56, 42, 28, 0, 0, 0, 0, 0]);
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret center space test', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -366,7 +366,7 @@ void main() {
|
||||
caretOffset = painter.getOffsetForCaret(const ui.TextPosition(offset: 2), ui.Rect.zero);
|
||||
expect(caretOffset.dx, 49);
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter caret height and line height', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -383,7 +383,7 @@ void main() {
|
||||
);
|
||||
expect(caretHeight, 50.0);
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('upstream downstream makes no difference in the same line within the same bidi run', () {
|
||||
final TextPainter painter = TextPainter(textDirection: TextDirection.ltr)
|
||||
@ -420,7 +420,7 @@ void main() {
|
||||
painter.getOffsetForCaret(TextPosition(offset: text.length), largeRect).dx,
|
||||
1000 - text.length * fontSize - largeRect.width,
|
||||
);
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('End of text caret when the text ends with +1 bidi level', () {
|
||||
const double fontSize = 14.0;
|
||||
@ -444,7 +444,7 @@ void main() {
|
||||
painter.getOffsetForCaret(const TextPosition(offset: 2), largeRect).dx,
|
||||
fontSize * 2,
|
||||
);
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('handles newlines properly', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -1056,7 +1056,7 @@ void main() {
|
||||
expect(painter.inlinePlaceholderBoxes![12], const TextBox.fromLTRBD(300, 30, 351, 60, TextDirection.ltr));
|
||||
expect(painter.inlinePlaceholderBoxes![13], const TextBox.fromLTRBD(351, 30, 401, 60, TextDirection.ltr));
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/87540
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/87540
|
||||
|
||||
// Null values are valid. See https://github.com/flutter/flutter/pull/48346#issuecomment-584839221
|
||||
test('TextPainter set TextHeightBehavior null test', () {
|
||||
@ -1131,7 +1131,7 @@ void main() {
|
||||
expect(lines[2].lineNumber, 2);
|
||||
expect(lines[3].lineNumber, 3);
|
||||
painter.dispose();
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/122066
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/122066
|
||||
|
||||
group('TextPainter line-height', () {
|
||||
test('half-leading', () {
|
||||
@ -1253,7 +1253,7 @@ void main() {
|
||||
expect(glyphBox, newGlyphBox);
|
||||
painter.dispose();
|
||||
});
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/87543
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/87543
|
||||
|
||||
test('TextPainter handles invalid UTF-16', () {
|
||||
FlutterErrorDetails? error;
|
||||
@ -1290,7 +1290,7 @@ void main() {
|
||||
ui.Rect.zero);
|
||||
expect(caretOffset.dx, painter.width);
|
||||
painter.dispose();
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/87545
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/87545
|
||||
|
||||
test('TextPainter line metrics update after layout', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -1311,7 +1311,7 @@ void main() {
|
||||
lines = painter.computeLineMetrics();
|
||||
expect(lines.length, 1);
|
||||
painter.dispose();
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/62819
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/62819
|
||||
|
||||
test('TextPainter throws with stack trace when accessing text layout', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -1383,7 +1383,7 @@ void main() {
|
||||
)),
|
||||
);
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter does not require layout after providing identical placeholder dimensions', () {
|
||||
final TextPainter painter = TextPainter()
|
||||
@ -1420,7 +1420,7 @@ void main() {
|
||||
))),
|
||||
);
|
||||
painter.dispose();
|
||||
}, skip: isBrowser && !isCanvasKit); // https://github.com/flutter/flutter/issues/56308
|
||||
}, skip: isBrowser && !isSkiaWeb); // https://github.com/flutter/flutter/issues/56308
|
||||
|
||||
test('TextPainter - debugDisposed', () {
|
||||
final TextPainter painter = TextPainter();
|
||||
@ -1613,7 +1613,7 @@ void main() {
|
||||
case final List<ui.LineMetrics> metrics:
|
||||
expect(metrics, hasLength(1));
|
||||
}
|
||||
}, skip: kIsWeb && !isCanvasKit); // [intended] Browsers seem to always round font/glyph metrics.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] Browsers seem to always round font/glyph metrics.
|
||||
|
||||
group('strut style', () {
|
||||
test('strut style applies when the span has no style', () {
|
||||
@ -1680,7 +1680,7 @@ void main() {
|
||||
..layout();
|
||||
expect(painter.height, 100);
|
||||
});
|
||||
}, skip: kIsWeb && !isCanvasKit); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
|
||||
test('TextPainter dispatches memory events', () async {
|
||||
await expectLater(
|
||||
|
||||
@ -111,7 +111,7 @@ void main() {
|
||||
|
||||
editable.strutStyle = const StrutStyle(fontSize: 100, forceStrutHeight: true);
|
||||
expect(editable.getMaxIntrinsicHeight(double.infinity), 100);
|
||||
}, skip: kIsWeb && !isCanvasKit); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut support for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}
|
||||
|
||||
class _FakeEditableTextState with TextSelectionDelegate {
|
||||
|
||||
@ -534,7 +534,7 @@ void main() {
|
||||
// Ensure we can render the same scene again after rendering an interior
|
||||
// layer.
|
||||
parent.buildScene(SceneBuilder());
|
||||
}, skip: isBrowser && !isCanvasKit); // TODO(yjbanov): `toImage` doesn't work in HTML: https://github.com/flutter/flutter/issues/49857
|
||||
}, skip: isBrowser && !isSkiaWeb); // TODO(yjbanov): `toImage` doesn't work in HTML: https://github.com/flutter/flutter/issues/49857
|
||||
|
||||
test('ContainerLayer.toImageSync can render interior layer', () {
|
||||
final OffsetLayer parent = OffsetLayer();
|
||||
@ -552,7 +552,7 @@ void main() {
|
||||
// Ensure we can render the same scene again after rendering an interior
|
||||
// layer.
|
||||
parent.buildScene(SceneBuilder());
|
||||
}, skip: isBrowser && !isCanvasKit); // TODO(yjbanov): `toImage` doesn't work in HTML: https://github.com/flutter/flutter/issues/49857
|
||||
}, skip: isBrowser && !isSkiaWeb); // TODO(yjbanov): `toImage` doesn't work in HTML: https://github.com/flutter/flutter/issues/49857
|
||||
|
||||
test('PictureLayer does not let you call dispose unless refcount is 0', () {
|
||||
PictureLayer layer = PictureLayer(Rect.zero);
|
||||
|
||||
@ -111,5 +111,5 @@ void main() {
|
||||
|
||||
paragraph.strutStyle = const StrutStyle(fontSize: 100, forceStrutHeight: true);
|
||||
expect(paragraph.getMaxIntrinsicHeight(double.infinity), 100);
|
||||
}, skip: kIsWeb && !isCanvasKit); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, Paragraph, TextBox;
|
||||
|
||||
import 'package:flutter/foundation.dart' show isCanvasKit, kIsWeb;
|
||||
import 'package:flutter/foundation.dart' show isSkiaWeb, kIsWeb;
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
@ -206,7 +206,7 @@ void main() {
|
||||
expect(boxes[2], const TextBox.fromLTRBD(0.0, 10.0, 130.0, 20.0, TextDirection.ltr));
|
||||
// 'fifth':
|
||||
expect(boxes[3], const TextBox.fromLTRBD(0.0, 20.0, 50.0, 30.0, TextDirection.ltr));
|
||||
}, skip: kIsWeb && !isCanvasKit); // https://github.com/flutter/flutter/issues/61016
|
||||
}, skip: kIsWeb && !isSkiaWeb); // https://github.com/flutter/flutter/issues/61016
|
||||
|
||||
test('getBoxesForSelection test with boxHeightStyle and boxWidthStyle set to max', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
|
||||
@ -1264,7 +1264,7 @@ void main() {
|
||||
paints..rect(color: cursorColor, rect: caretRect),
|
||||
);
|
||||
},
|
||||
skip: isBrowser && !isCanvasKit, // https://github.com/flutter/flutter/issues/56308
|
||||
skip: isBrowser && !isSkiaWeb, // https://github.com/flutter/flutter/issues/56308
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
|
||||
@ -14,15 +14,10 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
extension on web.HTMLCollection {
|
||||
Iterable<web.Element> get iterable => _genIterable(this);
|
||||
Iterable<web.Element?> get iterable => Iterable<web.Element?>.generate(length, (int index) => item(index));
|
||||
}
|
||||
extension on web.CSSRuleList {
|
||||
Iterable<web.CSSRule> get iterable => _genIterable(this);
|
||||
}
|
||||
|
||||
Iterable<T> _genIterable<T>(dynamic jsCollection) {
|
||||
// ignore: avoid_dynamic_calls
|
||||
return Iterable<T>.generate(jsCollection.length as int, (int index) => jsCollection.item(index) as T,);
|
||||
Iterable<web.CSSRule?> get iterable => Iterable<web.CSSRule?>.generate(length, (int index) => item(index));
|
||||
}
|
||||
|
||||
void main() {
|
||||
@ -46,13 +41,14 @@ void main() {
|
||||
|
||||
expect(web.document.head!.children.iterable, isNotEmpty);
|
||||
bool foundStyle = false;
|
||||
for (final web.Element element in web.document.head!.children.iterable) {
|
||||
if (element.tagName != 'STYLE') {
|
||||
for (final web.Element? element in web.document.head!.children.iterable) {
|
||||
expect(element, isNotNull);
|
||||
if (element!.tagName != 'STYLE') {
|
||||
continue;
|
||||
}
|
||||
final web.CSSRuleList? rules = (element as web.HTMLStyleElement).sheet?.rules;
|
||||
if (rules != null) {
|
||||
foundStyle = rules.iterable.any((web.CSSRule rule) => rule.cssText.contains(className));
|
||||
foundStyle = rules.iterable.any((web.CSSRule? rule) => rule!.cssText.contains(className));
|
||||
}
|
||||
if (foundStyle) {
|
||||
break;
|
||||
|
||||
@ -387,7 +387,7 @@ class SkiaGoldClient {
|
||||
// differences are very small (typically not noticeable to human eye).
|
||||
List<String> _getPixelMatchingArguments() {
|
||||
// Only use fuzzy pixel matching in the HTML renderer.
|
||||
if (!_isBrowserTest || _isBrowserCanvasKitTest) {
|
||||
if (!_isBrowserTest || _isBrowserSkiaTest) {
|
||||
return const <String>[];
|
||||
}
|
||||
|
||||
@ -499,6 +499,7 @@ class SkiaGoldClient {
|
||||
/// image was rendered on, and for web tests, the browser the image was
|
||||
/// rendered on.
|
||||
String _getKeysJSON() {
|
||||
final String? webRenderer = _webRendererValue;
|
||||
final Map<String, dynamic> keys = <String, dynamic>{
|
||||
'Platform' : platform.operatingSystem,
|
||||
'Abi': abi.toString(),
|
||||
@ -509,8 +510,8 @@ class SkiaGoldClient {
|
||||
if (_isBrowserTest) {
|
||||
keys['Browser'] = _browserKey;
|
||||
keys['Platform'] = '${keys['Platform']}-browser';
|
||||
if (_isBrowserCanvasKitTest) {
|
||||
keys['WebRenderer'] = 'canvaskit';
|
||||
if (webRenderer != null) {
|
||||
keys['WebRenderer'] = webRenderer;
|
||||
}
|
||||
}
|
||||
return json.encode(keys);
|
||||
@ -556,8 +557,15 @@ class SkiaGoldClient {
|
||||
return platform.environment[_kTestBrowserKey] != null;
|
||||
}
|
||||
|
||||
bool get _isBrowserCanvasKitTest {
|
||||
return _isBrowserTest && platform.environment[_kWebRendererKey] == 'canvaskit';
|
||||
bool get _isBrowserSkiaTest {
|
||||
return _isBrowserTest && switch (platform.environment[_kWebRendererKey]) {
|
||||
'canvaskit' || 'skwasm' => true,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
String? get _webRendererValue {
|
||||
return _isBrowserSkiaTest ? platform.environment[_kWebRendererKey] : null;
|
||||
}
|
||||
|
||||
bool get _isImpeller {
|
||||
@ -573,11 +581,12 @@ class SkiaGoldClient {
|
||||
/// the latest positive digest on Flutter Gold with a hex-encoded md5 hash of
|
||||
/// the image keys.
|
||||
String getTraceID(String testName) {
|
||||
final String? webRenderer = _webRendererValue;
|
||||
final Map<String, Object?> keys = <String, Object?>{
|
||||
if (_isBrowserTest)
|
||||
'Browser' : _browserKey,
|
||||
if (_isBrowserCanvasKitTest)
|
||||
'WebRenderer' : 'canvaskit',
|
||||
if (webRenderer != null)
|
||||
'WebRenderer' : webRenderer,
|
||||
'CI' : 'luci',
|
||||
'Platform' : platform.operatingSystem,
|
||||
'Abi': abi.toString(),
|
||||
|
||||
@ -62,8 +62,8 @@ class MatchesGoldenFile extends AsyncMatcher {
|
||||
final ui.FlutterView view = binding.platformDispatcher.implicitView!;
|
||||
final RenderView renderView = binding.renderViews.firstWhere((RenderView r) => r.flutterView == view);
|
||||
|
||||
if (isCanvasKit) {
|
||||
// In CanvasKit, use Layer.toImage to generate the screenshot.
|
||||
if (isSkiaWeb) {
|
||||
// In CanvasKit and Skwasm, use Layer.toImage to generate the screenshot.
|
||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.instance;
|
||||
return binding.runAsync<String?>(() async {
|
||||
assert(element.renderObject != null);
|
||||
|
||||
@ -4,12 +4,12 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
/// Whether the test is running in a web browser compiled to JavaScript.
|
||||
/// Whether the test is running in a web browser compiled to JavaScript or WebAssembly.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [kIsWeb], the equivalent constant in the `foundation` library.
|
||||
const bool isBrowser = identical(0, 0.0);
|
||||
const bool isBrowser = bool.fromEnvironment('dart.library.js_interop');
|
||||
|
||||
/// Whether the test is running on the Windows operating system.
|
||||
///
|
||||
|
||||
@ -93,7 +93,7 @@ class TestGoldenComparator {
|
||||
final Map<String, String> environment = <String, String>{
|
||||
// Chrome is the only supported browser currently.
|
||||
'FLUTTER_TEST_BROWSER': 'chrome',
|
||||
'FLUTTER_WEB_RENDERER': webRenderer == WebRendererMode.html ? 'html' : 'canvaskit',
|
||||
'FLUTTER_WEB_RENDERER': webRenderer.name,
|
||||
};
|
||||
return _processManager.start(command, environment: environment);
|
||||
}
|
||||
|
||||
@ -238,15 +238,17 @@ class WebTestCompiler {
|
||||
'--extra-compiler-option=--multi-root-scheme=org-dartlang-app',
|
||||
'--extra-compiler-option=--multi-root=${projectDirectory.childDirectory('test').path}',
|
||||
'--extra-compiler-option=--multi-root=${outputDirectory.path}',
|
||||
'--extra-compiler-option=--enable-asserts',
|
||||
'--extra-compiler-option=--no-inlining',
|
||||
if (webRenderer == WebRendererMode.skwasm) ...<String>[
|
||||
'--extra-compiler-option=--import-shared-memory',
|
||||
'--extra-compiler-option=--shared-memory-max-pages=32768',
|
||||
],
|
||||
],
|
||||
...buildInfo.extraFrontEndOptions,
|
||||
for (final String dartDefine in dartDefines)
|
||||
'-D$dartDefine',
|
||||
|
||||
'-O1',
|
||||
'-O0',
|
||||
'-o',
|
||||
outputWasmFile.path,
|
||||
testFile.path, // dartfile
|
||||
@ -257,8 +259,7 @@ class WebTestCompiler {
|
||||
processManager: _processManager,
|
||||
);
|
||||
|
||||
await processUtils.run(
|
||||
throwOnError: true,
|
||||
await processUtils.stream(
|
||||
compilationArgs,
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user