mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 17:07:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
54
dom/canvas/test/chrome/test_drawWindow_widget_layers.html
Normal file
54
dom/canvas/test/chrome/test_drawWindow_widget_layers.html
Normal file
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue