mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 564815 - Tests for window.devicePixelRatio
This commit is contained in:
parent
7a3c11ea5e
commit
97a28ee558
@ -38,6 +38,9 @@ function doTests()
|
||||
var domWindowUtils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
var devPxPerCSSPx = domWindowUtils.screenPixelsPerCSSPixel;
|
||||
|
||||
is(window.devicePixelRatio, devPxPerCSSPx, "window.devicePixelRatio");
|
||||
|
||||
var windowBO = document.documentElement.boxObject;
|
||||
isRounded(window.mozInnerScreenX*devPxPerCSSPx, windowBO.screenX,
|
||||
"window screen X");
|
||||
@ -64,6 +67,8 @@ function doTests()
|
||||
is(frameDomWindowUtils.screenPixelsPerCSSPixel, 2*devPxPerCSSPx,
|
||||
"frame screen pixels per CSS pixel");
|
||||
|
||||
is(f.contentWindow.devicePixelRatio, 2*devPxPerCSSPx, "frame devicePixelRatio");
|
||||
|
||||
isRounded(f.contentWindow.mozInnerScreenX*2,
|
||||
window.mozInnerScreenX + fBounds.left,
|
||||
"zoomed frame screen X");
|
||||
|
Loading…
Reference in New Issue
Block a user