Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

update Scene.toImageSync test to use proper bounds in the request #37638

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions testing/dart/compositing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ void main() {
builder.addTexture(0, width: 10, height: 10);

final Scene scene = builder.build();
final Image image = scene.toImageSync(10, 10);
final Image image = scene.toImageSync(20, 20);
scene.dispose();

expect(image.width, 10);
expect(image.height, 10);
expect(image.width, 20);
expect(image.height, 20);

final ByteData? data = await image.toByteData();

expect(data, isNotNull);
expect(data!.lengthInBytes, 10 * 10 * 4);
expect(data!.lengthInBytes, 20 * 20 * 4);
expect(data.buffer.asUint8List()[0], 0);
expect(data.buffer.asUint8List()[1], 0);
expect(data.buffer.asUint8List()[2], 0);
Expand Down