chromium/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_transfer/transferToGPUTexture-balanced-access.https.html

<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./webgpu-helpers.js"></script>
</head>

<h1>Canvas2D WebGPU Transfer: transferToGPUTexture-balanced-access</h1>

<p>transferToGPUTexture() allows repeated calls after a call to
transferBackFromGPUTexture().</p>

<canvas id="c" width="50" height="50"></canvas>

<script>

promise_test(() => {
    return with_webgpu((adapter, adapterInfo, device) => {
      test_transferToGPUTexture_balanced_access(
          device,
          document.getElementById('c'));
    });
  },
  'transferToGPUTexture() allows repeated calls after a call to ' +
  'transferBackFromGPUTexture().'
);

promise_test(() => {
    return with_webgpu((adapter, adapterInfo, device) => {
      test_transferToGPUTexture_balanced_access(
          device,
          new OffscreenCanvas(50, 50));
    });
  },
  'transferToGPUTexture() on an offscreen context allows repeated calls ' +
  'after a call to transferBackFromGPUTexture().'
);

</script>