Sign in
chromium
/
chromium
/
src
/
630d591ccef3a59da37409c5730e123501f95e0d
/
.
/
third_party
/
blink
/
web_tests
/
external
/
wpt
/
webdriver
/
tests
/
take_screenshot
/
__init__.py
blob: c07f8d167030d03abbb263ef08d8846bb7a71eba [
file
] [
log
] [
blame
]
def
viewport_dimensions
(
session
):
return
tuple
(
session
.
execute_script
(
"""
let {devicePixelRatio, innerHeight, innerWidth} = window;
return [
Math.floor(innerWidth * devicePixelRatio),
Math.floor(innerHeight * devicePixelRatio)
];
"""
))