Skip to content

Commit

Permalink
Bug 1877096 - [wdspec] Fix AsyncPoll.until() to correctly await the r…
Browse files Browse the repository at this point in the history
…esult of the condition. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D199887
  • Loading branch information
whimboo committed Jan 30, 2024
1 parent 06e2288 commit acb4994
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testing/web-platform/tests/webdriver/tests/support/sync.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import collections
import inspect
import sys
import time

Expand Down Expand Up @@ -250,6 +251,8 @@ async def poll():

try:
result = condition(self.session)
if inspect.isawaitable(result):
result = await result
except (KeyboardInterrupt, SystemExit):
raise
except self.exceptions:
Expand Down

0 comments on commit acb4994

Please sign in to comment.