content/canvas/test/test_drawImage_document_domain.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 type="application/javascript" 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);
    36   }
    37 }
    39 function doTest() {
    40   frames[0].postMessage("start", "*");
    41 }
    43 addLoadEvent(doTest);
    45 </script>
    46 </pre>
    47 </body>
    48 </html>

mercurial