tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_drawImage_document_domain.html (1235B)


      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">
     20 
     21 /** Test for Bug 567511 */
     22 
     23 SimpleTest.waitForExplicitFinish();
     24 
     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 }
     38 
     39 function doTest() {
     40  frames[0].postMessage("start", "*");
     41 }
     42 
     43 addLoadEvent(doTest);
     44 
     45 </script>
     46 </pre>
     47 </body>
     48 </html>