content/canvas/test/chrome/test_drawWindow_widget_layers.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/canvas/test/chrome/test_drawWindow_widget_layers.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <meta charset="utf-8">
     1.8 +  <title>Test for canvas drawWindow</title>
     1.9 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.10 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
    1.11 +  <script type="application/javascript" src="file_drawWindow_common.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
    1.13 +  <script type="application/javascript">
    1.14 +
    1.15 +  SimpleTest.waitForExplicitFinish();
    1.16 +  window.addEventListener("load", openSourceWindow, false);
    1.17 +
    1.18 +  var sourceWindow;
    1.19 +
    1.20 +  function openSourceWindow(event) {
    1.21 +    if (event.target != document) {
    1.22 +      return;
    1.23 +    }
    1.24 +
    1.25 +    // Need to open as a toplevel chrome window so that
    1.26 +    // DRAWWINDOW_USE_WIDGET_LAYERS is honored.
    1.27 +    sourceWindow = window.open("file_drawWindow_source.html", "",
    1.28 +                               "chrome,width=200,height=100");
    1.29 +    sourceWindow.addEventListener("load", runTests, false);
    1.30 +  }
    1.31 +
    1.32 +  function runTests(event) {
    1.33 +    if (event.target != sourceWindow.document) {
    1.34 +      return;
    1.35 +    }
    1.36 +
    1.37 +    var cxInterfaceWrap = SpecialPowers.wrap(CanvasRenderingContext2D);
    1.38 +    var flags = cxInterfaceWrap.DRAWWINDOW_USE_WIDGET_LAYERS |
    1.39 +                cxInterfaceWrap.DRAWWINDOW_DRAW_CARET |
    1.40 +                cxInterfaceWrap.DRAWWINDOW_DRAW_VIEW;
    1.41 +    runDrawWindowTests(sourceWindow, flags, true);
    1.42 +
    1.43 +    sourceWindow.close();
    1.44 +
    1.45 +    SimpleTest.finish();
    1.46 +  }
    1.47 +
    1.48 +  </script>
    1.49 +</head>
    1.50 +<body>
    1.51 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
    1.52 +</body>
    1.53 +</html>

mercurial