webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

[Set Window Rect] Why result is integral & round down

Open yezhizhen opened this issue 5 months ago • 4 comments

Continuing from https://github.com/w3c/webdriver/pull/1909#issuecomment-3064547138. Based on test expectation, the set parameter can be floats. But the result is expected to floor down to integer.

The question is:

  1. Why should the result be integral? https://github.com/web-platform-tests/wpt/blob/7da2887747da3ae5215b88e22d61a0fb69e13acb/webdriver/tests/classic/set_window_rect/set.py#L41
  2. Why do we round down? https://github.com/web-platform-tests/wpt/blob/7da2887747da3ae5215b88e22d61a0fb69e13acb/webdriver/tests/classic/set_window_rect/set.py#L160

It seems neither is specified in Spec.

yezhizhen avatar Jul 12 '25 03:07 yezhizhen