From e717b6c30e07a1b784571d80370197409f27ef30 Mon Sep 17 00:00:00 2001 From: Yegor Date: Mon, 24 Mar 2025 10:44:04 -0700 Subject: [PATCH] [web] skip image_to_byte_data_test.dart in Firefox (#165678) Most of our tests that need graphics already skip Firefox. This test somehow was lucky enough to pass in Firefox until the latest Ubuntu upgrade. It is finally failing as expected, so skipping. Co-authored-by: Kevin Moore --- .../lib/web_ui/test/engine/image_to_byte_data_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/web_ui/test/engine/image_to_byte_data_test.dart b/engine/src/flutter/lib/web_ui/test/engine/image_to_byte_data_test.dart index 3ec7eb1db3..0456aad907 100644 --- a/engine/src/flutter/lib/web_ui/test/engine/image_to_byte_data_test.dart +++ b/engine/src/flutter/lib/web_ui/test/engine/image_to_byte_data_test.dart @@ -6,6 +6,7 @@ import 'dart:typed_data'; import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; +import 'package:ui/src/engine/browser_detection.dart'; import 'package:ui/ui.dart'; import '../common/test_initialization.dart'; @@ -38,12 +39,16 @@ Future testMain() async { // test the header. final List pngHeader = [137, 80, 78, 71, 13, 10, 26, 10]; expect(pngBytes.buffer.asUint8List().sublist(0, pngHeader.length), pngHeader); - }); + + // Firefox does not support WebGL in headless mode. + }, skip: isFirefox); test('Image.toByteData(format: ImageByteFormat.rawStraightRgba)', () async { final Image testImage = await createTestImageByColor(const Color(0xAAFFFF00)); final ByteData bytes = (await testImage.toByteData(format: ImageByteFormat.rawStraightRgba))!; expect(bytes.buffer.asUint32List(), [0xAA00FFFF, 0xAA00FFFF, 0xAA00FFFF, 0xAA00FFFF]); - }); + + // Firefox does not support WebGL in headless mode. + }, skip: isFirefox); }