summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/test_accelerated_canvas_context_loss.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/test_accelerated_canvas_context_loss.html')
-rw-r--r--dom/canvas/test/test_accelerated_canvas_context_loss.html12
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;