content/canvas/test/test_drawWindow.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <meta charset="utf-8">
     5   <title>Test for canvas drawWindow</title>
     6   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     7   <script type="application/javascript" 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", openSourceWindow, false);
    15   var sourceWindow;
    17   function openSourceWindow(event) {
    18     if (event.target != document) {
    19       return;
    20     }
    22     sourceWindow = window.open("file_drawWindow_source.html", "",
    23                                "width=200,height=100");
    24     sourceWindow.addEventListener("load", runTests, false);
    25   }
    27   function runTests(event) {
    28     if (event.target != sourceWindow.document) {
    29       return;
    30     }
    32     // Run the tests with the source document in an <iframe> within this
    33     // page, which we expect to have transparency.
    34     runDrawWindowTests(document.getElementById("source").contentWindow,
    35                        0, true);
    37     // Run the tests on the same source document, but in a window opened
    38     // by window.open.  We do not expect this to have transparency...
    39     // except on B2G.  (This is *probably* a bug in B2G.)
    40     var isB2G = /Mobile|Tablet/.test(navigator.userAgent) &&
    41                 !navigator.userAgent.contains("Android");
    42     runDrawWindowTests(sourceWindow, 0, isB2G);
    44     sourceWindow.close();
    46     SimpleTest.finish();
    47   }
    49   </script>
    50 </head>
    51 <body>
    52 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
    53 <iframe id="source" src="file_drawWindow_source.html" width="200" height="100"></iframe>
    54 </body>
    55 </html>

mercurial