New issue
Advanced search Search tips

Issue 787143 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Need a way to force particular time for page rendering through DevTools

Project Member Reported by dats@chromium.org, Nov 20 2017

Issue description

Nov 3
To achieve predictable and reproducible results of rendering a page in headless chrome we need control over what time is being assumed by the JS engine. I suggest adding a method or two to the Emulation domain to override current time and timezone.

This will be handled by EmulationHandler (https://cs.chromium.org/chromium/src/content/browser/devtools/protocol/emulation_handler.h). Time needs to be IPC-forwarded (https://cs.chromium.org/chromium/src/content/common/renderer.mojom) to the Renderer process so it can be used as an override in gin's implementation of v8::Platform (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?l=271).

Timezone for now must be enforced browser-wide with tzset() straight in the handler because TZ syscalls are proxied from renderer to browser (https://cs.chromium.org/chromium/src/content/zygote/zygote_main_linux.cc?l=150), but when v8 completes their switch to icu timezones (https://cs.chromium.org/chromium/src/v8/src/flag-definitions.h?type=cs&l=267) this can also be set per-renderer by using icu's API's (like this: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp?q=timezonemonitorclient&dr=CSs&l=63).
 
Status: WontFix (was: Untriaged)
As per offline discussion, this needs to be considered along with the virtual time emulation.

Sign in to add a comment