diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/canvas/test/chrome/test_drawWindow_widget_layers.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/canvas/test/chrome/test_drawWindow_widget_layers.html')
-rw-r--r-- | dom/canvas/test/chrome/test_drawWindow_widget_layers.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dom/canvas/test/chrome/test_drawWindow_widget_layers.html b/dom/canvas/test/chrome/test_drawWindow_widget_layers.html new file mode 100644 index 000000000..a1f357f5a --- /dev/null +++ b/dom/canvas/test/chrome/test_drawWindow_widget_layers.html @@ -0,0 +1,54 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title>Test for canvas drawWindow</title> + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> + <script type="application/javascript" src="file_drawWindow_common.js"></script> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> + <script type="application/javascript"> + + SimpleTest.waitForExplicitFinish(); + window.addEventListener("load", openSourceWindow, false); + + var sourceWindow; + + function openSourceWindow(event) { + if (event.target != document) { + return; + } + + // Add a little bottom padding to the window so that we don't capture the + // rounded corners at the bottom, which our GL drawing code on OS X draws + // for regular windows. + // (The reftest framework doesn't have this problem because it doesn't use + // a regular window with a titlebar, so there are no rounded corners.) + const WINDOW_INNER_WIDTH = CANVAS_WIDTH; + const WINDOW_INNER_HEIGHT = CANVAS_HEIGHT + 10; + + // Need to open as a toplevel chrome window so that + // DRAWWINDOW_USE_WIDGET_LAYERS is honored. + sourceWindow = window.open("file_drawWindow_source.html", "", + `chrome,width=${WINDOW_INNER_WIDTH},height=${WINDOW_INNER_HEIGHT}`); + SimpleTest.waitForFocus(runTests, sourceWindow); + } + + function runTests() { + var cxInterfaceWrap = SpecialPowers.wrap(CanvasRenderingContext2D); + var flags = cxInterfaceWrap.DRAWWINDOW_USE_WIDGET_LAYERS | + cxInterfaceWrap.DRAWWINDOW_DRAW_CARET | + cxInterfaceWrap.DRAWWINDOW_DRAW_VIEW; + runDrawWindowTests(sourceWindow, flags, true); + + sourceWindow.close(); + + SimpleTest.finish(); + } + + </script> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a> +</body> +</html> |