blob: 7fb575107d3bb8bdf95c15b0c37080e2f92f40be [file] [log] [blame]
Chromium WPT Sync812fde42017-06-13 12:55:581<!DOCTYPE html>
2<html class="reftest-wait">
3<link rel="match" href="background-image-multiple-ref.html">
4<style>
5 #output {
6 width: 100px;
7 height: 100px;
8 background-image: paint(n0), paint(n1), paint(n2);
9 }
10</style>
11<script src="/common/reftest-wait.js"></script>
12<script src="/common/css-paint-tests.js"></script>
13<body>
14<div id="output"></div>
15
16<script id="code" type="text/worklet">
17var colors = ['red', 'green', 'blue'];
18
19for (let i = 0; i < 3; i++) {
20 registerPaint('n' + i, class {
21 paint(ctx, geom) {
22 ctx.fillStyle = colors[i];
23 ctx.fillRect(i * 20, i * 20, 40, 40);
24 }
25 });
26}
27</script>
28
29<script>
30 importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
31</script>
32</body>
33</html>