From 85310221f0512bf1aeefc49ead8a1e11bda55990 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:01:59 +0200 Subject: Adding upstream version 126.0.1. Signed-off-by: Daniel Baumann --- dom/canvas/test/test_accelerated_canvas_context_loss.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dom/canvas/test') diff --git a/dom/canvas/test/test_accelerated_canvas_context_loss.html b/dom/canvas/test/test_accelerated_canvas_context_loss.html index 6172420bcb..610c8d8fc3 100644 --- a/dom/canvas/test/test_accelerated_canvas_context_loss.html +++ b/dom/canvas/test/test_accelerated_canvas_context_loss.html @@ -58,6 +58,12 @@ let countRestoredEvents = 0; function onContextLost() { ok(context.isContextLost(), "Canvas context should be lost during contextlost event"); + + try { + let transform = context.getTransform(); + ok(transform.isIdentity, "Canvas context should return identity transform while context lost"); + } catch (e) {} + countLostEvents += 1; } @@ -88,6 +94,12 @@ async function start() { ok(!context.isContextLost(), "Canvas context should not be lost after initial fill"); + let transform = context.getTransform(); + ok(transform.isIdentity, "Canvas context should default to identity transform"); + context.setTransform(2.0, 3.0, 4.0, 5.0, 6.0, 7.0); + transform = context.getTransform(); + ok(!transform.isIdentity, "Canvas context should have non-identity transform"); + const restarted = await restartGPUProcess(); const expectedEvents = restarted ? 1 : 0; -- cgit v1.2.3