[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 <kevmoo@users.noreply.github.com>
This commit is contained in:
Yegor
2025-03-24 10:44:04 -07:00
committed by GitHub
parent 84cd384682
commit e717b6c30e

View File

@@ -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<void> testMain() async {
// test the header.
final List<int> pngHeader = <int>[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(), <int>[0xAA00FFFF, 0xAA00FFFF, 0xAA00FFFF, 0xAA00FFFF]);
});
// Firefox does not support WebGL in headless mode.
}, skip: isFirefox);
}