Window Test

Click a button to perform the associated window action.

Input values are in DIP coordinates. See here for important details about coordinate systems and window behavior.

Implementation details for cefclient (click to expand).

- The below actions will configure window size (window.outerWidth/Height) and position (window.screenX/Y) as reported by browser content (see "Current window settings" below).
- Whether this calculation includes the window frame will depend on what information is known/provided to CEF.

- Views-hosted windows are sized/positioned relative to the CefWindow frame.
- Native windows (--use-native) are sized/positioned relative to the cefclient window frame.

- MacOS windows are sized/positioned relative to the parent NSWindow frame (default behavior).
- Windows windows are sized/positioned relative to the root HWND frame (default behavior).
- Linux windows are sized/positioned relative to CefDisplayHandler::GetRootWindowScreenRect.

- Windowless (off-screen) windows (--off-screen-rendering-enabled) are sized/positioned relative to CefRenderHandler::GetRootScreenRect.

- Pass --fake-screen-bounds to instead size/position relative to the browser content area. This will also report (0,0) for position.

- Exiting and relaunching cefclient will save/restore window bounds as DIP coordinates in all modes.
- The window.devicePixelRatio value is a combination of device scale factor and browser zoom (if not 100%).

- Default device scale factor will match the associated display (e.g. user/system-level display settings).
- Device scale factor can be configured via command-line (--force-device-scale-factor=[float]) or the "Tests > Set Scale Factor" menu option with windowless rendering.

- MacOS custom device scale factor will impact rendering quality only. DIP coordinates are not impacted.
- Windows/Linux custom device scale factor will impact rendering quality and DIP coordinates.

- Browser zoom can be configured via the Chrome menu or "Tests > Zoom In/Out/Reset" menu options.

(minimizes and then restores the window as topmost)
(works with Views)
(uses Fullscreen API; background turns pink)
X: Y: Width: Height:
(works on macOS with Views)
window.
(,) (calls CefDisplayHandler::OnContentsBoundsChange)

Current window settings: