// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.layer.ctm.getTransform
// Description:Tests getTransform inside layers.
// Note:

importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");

test(t => {
  var canvas = new OffscreenCanvas(100, 50);
  var ctx = canvas.getContext('2d');

  ctx.translate(10, 20);
  ctx.beginLayer();
  ctx.scale(2, 3);
  const m = ctx.getTransform();
  assert_array_equals([m.a, m.b, m.c, m.d, m.e, m.f], [2, 0, 0, 3, 10, 20]);
  ctx.endLayer();
}, "Tests getTransform inside layers.");
done();
