diff options
Diffstat (limited to 'testing/web-platform/tests/html/canvas/tools/templates.yaml')
-rw-r--r-- | testing/web-platform/tests/html/canvas/tools/templates.yaml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/canvas/tools/templates.yaml b/testing/web-platform/tests/html/canvas/tools/templates.yaml new file mode 100644 index 0000000000..f2bc2569f7 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/tools/templates.yaml @@ -0,0 +1,79 @@ +w3coffscreencanvas: | + <!DOCTYPE html> + <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> + <title>OffscreenCanvas test: %(name)s</title>%(timeout)s + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/html/canvas/resources/canvas-tests.js"></script> + + <h1>%(name)s</h1> + <p class="desc">%(desc)s</p> + + %(notes)s + <script> + var t = async_test("%(escaped_desc)s"); + var t_pass = t.done.bind(t); + var t_fail = t.step_func(function(reason) { + throw reason; + }); + t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext(%(context_args)s); + + %(code)s + }); + </script> + + +w3cworker: | + %(timeout)s// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. + // OffscreenCanvas test in a worker:%(name)s + // Description:%(desc)s + // Note:%(notes)s + + importScripts("/resources/testharness.js"); + importScripts("/html/canvas/resources/canvas-tests.js"); + + var t = async_test("%(escaped_desc)s"); + var t_pass = t.done.bind(t); + var t_fail = t.step_func(function(reason) { + throw reason; + }); + t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext(%(context_args)s); + + %(code)s + }); + done(); + + +w3ccanvas: | + <!DOCTYPE html> + <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> + <title>Canvas test: %(name)s</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/html/canvas/resources/canvas-tests.js"></script> + <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> + %(fonts)s<body class="show_output"> + + <h1>%(name)s</h1> + <p class="desc">%(desc)s</p> + + %(notes)s + %(fonthack)s<p class="output">Actual output:</p> + <canvas id="c" class="output" %(canvas)s>%(fallback)s</canvas> + %(expected)s + <ul id="d"></ul> + <script> + var t = async_test("%(escaped_desc)s"); + _addTest(function(canvas, ctx) { + + %(code)s + + }%(attributes)s); + </script> + %(scripts)s%(images)s |