Bug 298656
| Summary: | [WebDriver][BiDi] Event timestamps should be an integral number | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/50600
Radar WebKit Bug Importer
<rdar://problem/160771385>