Bug 298656

Summary: [WebDriver][BiDi] Event timestamps should be an integral number
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WebDriverAssignee: Lauro Moura <lmoura>
Status: NEW    
Severity: Normal CC: bburg, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 281932    

Lauro Moura
Reported 2025-09-10 06:53:42 PDT
Currently, the timestamp event parameter is mapped to "number", which results in a C++ double type, usually filled from something like `WallTime::now().secondsSinceEpoch().milliseconds()` which might still contain a fractional part. Meanwhile, both Selenium and WPT tests expect them to be a plain int in Python, which matches the spec definition of this field being a "js-uint". We could work around it by just adding some `std::trunc` call before passing the values to the generated code. But maybe we could add an annotation like `"integral": true` to the json file, so the generated code ensures this constraint.
Attachments
Lauro Moura
Comment 1 2025-09-11 07:40:19 PDT
Radar WebKit Bug Importer
Comment 2 2025-09-17 06:54:25 PDT
Note You need to log in before you can comment on or make changes to this bug.