Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / canvas / test / test_drawSnapshot.html
blobe3019057dc7cf18f734e86fa4eefa743229dab5f
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for drawSnapshot</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <script src="/tests/SimpleTest/WindowSnapshot.js"></script>
8 <script type="application/javascript" src="file_drawWindow_common.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 <script type="application/javascript">
12 SimpleTest.waitForExplicitFinish();
13 window.addEventListener("load", runTests);
15 async function runTests(event) {
16 let snapshot = async function(context, x, y, width, height, bg) {
17 let elem = document.getElementById("source");
19 var rect = new window.DOMRect(x, y, width, height);
21 let image = await SpecialPowers.snapshotContext(elem, rect, bg);
22 context.drawImage(image, 0, 0);
25 // Run the tests with the source document in an <iframe> within this
26 // page, which we expect to have transparency.
27 await runDrawWindowTests(snapshot, true);
29 SimpleTest.finish();
32 </script>
33 </head>
34 <body>
35 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
36 <iframe id="source" src="file_drawWindow_source.html" width="200" height="100"></iframe>
37 </body>
38 </html>