https://github.com/web-platform-tests/wpt
Revision aceba7094d3d8145b85544ecca7c44de5f4b4f3a authored by plehegar on 16 May 2018, 11:21:12 UTC, committed by plehegar on 16 May 2018, 11:21:12 UTC
1 parent 74acc7e
Raw File
Tip revision: aceba7094d3d8145b85544ecca7c44de5f4b4f3a authored by plehegar on 16 May 2018, 11:21:12 UTC
Fixed moderators
Tip revision: aceba70
geometry-background-image-003.html
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="geometry-background-image-003-ref.html">
<style>
html, body { margin: 0; padding: 0; }
.container {
  width: 100px;
  height: 100px;
}

#canvas-geometry {
  background-image: paint(geometry);
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/css-paint-tests.js"></script>
<body>
<div id="canvas-geometry" class="container"></div>

<script id="code" type="text/worklet">
registerPaint('geometry', class {
    paint(ctx, geom) {
        ctx.strokeStyle = 'green';
        ctx.lineWidth = 4;
        ctx.strokeRect(0, 0, geom.width, geom.height);
    }
});
</script>

<script>
    document.body.style.zoom = "200%"
    importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
</script>
</body>
</html>
back to top