Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / canvas / test / test_drawImage_document_domain.html
blob0bef9e274e40a8354d3b77f3f2174815ab8f7824
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=567511
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 567511</title>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=567511">Mozilla Bug 567511</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 <iframe src="file_drawImage_document_domain.html"></iframe>
17 </div>
18 <pre id="test">
19 <script type="application/javascript">
21 /** Test for Bug 567511 **/
23 SimpleTest.waitForExplicitFinish();
25 window.onmessage = function(ev) {
26 if (ev.data.msg == "done") {
27 SimpleTest.finish();
28 } else if (ev.data.msg == "exception") {
29 ok(false, ev.data.data);
30 } else if (ev.data.msg == "color") {
31 is(ev.data.data, "rgba(0, 255, 0, 1)", "Should get correct color");
32 } else if (ev.data.msg == "unknown_message") {
33 ok(false, "Unknown message to child: " + ev.data.data);
34 } else {
35 ok(false, "Unknown message from child: " + ev.data.msg);
39 function doTest() {
40 frames[0].postMessage("start", "*");
43 addLoadEvent(doTest);
45 </script>
46 </pre>
47 </body>
48 </html>