4 https://bugzilla.mozilla.org/show_bug.cgi?id=567511
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"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=567511">Mozilla Bug
567511</a>
15 <div id=
"content" style=
"display: none">
16 <iframe src=
"file_drawImage_document_domain.html"></iframe>
19 <script type=
"application/javascript">
21 /** Test for Bug
567511 **/
23 SimpleTest.waitForExplicitFinish();
25 window.onmessage = function(ev) {
26 if (ev.data.msg ==
"done") {
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);
35 ok(false,
"Unknown message from child: " + ev.data.msg);
40 frames[
0].postMessage(
"start",
"*");