content/canvas/test/chrome/test_drawWindow_widget_layers.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="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     7   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
     8   <script type="application/javascript" src="file_drawWindow_common.js"></script>
     9   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/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     // Need to open as a toplevel chrome window so that
    23     // DRAWWINDOW_USE_WIDGET_LAYERS is honored.
    24     sourceWindow = window.open("file_drawWindow_source.html", "",
    25                                "chrome,width=200,height=100");
    26     sourceWindow.addEventListener("load", runTests, false);
    27   }
    29   function runTests(event) {
    30     if (event.target != sourceWindow.document) {
    31       return;
    32     }
    34     var cxInterfaceWrap = SpecialPowers.wrap(CanvasRenderingContext2D);
    35     var flags = cxInterfaceWrap.DRAWWINDOW_USE_WIDGET_LAYERS |
    36                 cxInterfaceWrap.DRAWWINDOW_DRAW_CARET |
    37                 cxInterfaceWrap.DRAWWINDOW_DRAW_VIEW;
    38     runDrawWindowTests(sourceWindow, flags, true);
    40     sourceWindow.close();
    42     SimpleTest.finish();
    43   }
    45   </script>
    46 </head>
    47 <body>
    48 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
    49 </body>
    50 </html>

mercurial