diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
commit | 85310221f0512bf1aeefc49ead8a1e11bda55990 (patch) | |
tree | 70a3efbfee6c7cbeb626185b35166d2c376b4bb8 /dom/canvas/test | |
parent | Adding upstream version 126.0. (diff) | |
download | firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.tar.xz firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.zip |
Adding upstream version 126.0.1.upstream/126.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/canvas/test')
-rw-r--r-- | dom/canvas/test/test_accelerated_canvas_context_loss.html | 12 |
1 files changed, 12 insertions, 0 deletions
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; |