Skip to content

Commit 710c6eb

Browse files
authored
width_offset and height_offset should never be negative (#46724)
Reftests all failing on Mac because windows size is set to 0. The reason windows size is zero is because width_offset and height_offset are negative -800 and -600 respectively, and when they are added to the expected size, the final size is 0. This seems to be some mac side syncronazation issue. Add this sanite check to bypass this issue for now. Bug: https://g-issues.chromium.org/issues/339909604
1 parent 0905968 commit 710c6eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/wptrunner/wptrunner/executors/executorwebdriver.py

+3
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,9 @@ def do_test(self, test):
696696
"""return [window.outerWidth - window.innerWidth,
697697
window.outerHeight - window.innerHeight];"""
698698
)
699+
# width_offset and height_offset should never be negative
700+
width_offset = max(width_offset, 0)
701+
height_offset = max(height_offset, 0)
699702
try:
700703
self.protocol.webdriver.window.position = (0, 0)
701704
except error.InvalidArgumentException:

0 commit comments

Comments
 (0)