Commit f8dbd41f authored by Lan Wei's avatar Lan Wei Committed by Commit Bot

[Chromedriver] De-flaky a chromedriver test testActionsMultiTouchPoint

testActionsMultiTouchPoint is flaky, I change the test to wait 50 ms
for the event handler to be executed before checking the length of the
touch events.

Bug: 1011225
Change-Id: I25b16f0c8d5a86959b9b9111c3dbe3ccb2d1ac75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846566Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703840}
parent f25aa145
...@@ -978,7 +978,13 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer): ...@@ -978,7 +978,13 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
"parameters": {"pointerType": "touch"}, "parameters": {"pointerType": "touch"},
"id": "pointer2"}]}) "id": "pointer2"}]})
self._driver.PerformActions(actions) self._driver.PerformActions(actions)
events = self._driver.ExecuteScript('return window.events') for _ in range(5):
events = self._driver.ExecuteScript('return window.events')
if len(events) == 4:
break
# Wait 10 ms for the event handler to be executed.
time.sleep(0.01)
self.assertEquals(4, len(events)) self.assertEquals(4, len(events))
self.assertEquals("touchstart", events[0]['type']) self.assertEquals("touchstart", events[0]['type'])
self.assertEquals("touchstart", events[1]['type']) self.assertEquals("touchstart", events[1]['type'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment