Commit 871421fc authored by Sahel Sharify's avatar Sahel Sharify Committed by Commit Bot

Fix SitePerProcessMouseWheelHitTestBrowserTest.* tests on Win official.

https://chromium-review.googlesource.com/865558 fixes this flaky tests
on win7_chromium_rel_ng, but it only waits for dispatching of the
first wheel event before sending the others.

This cl makes sure that each wheel event gets dispatched before sending
the next one.

I haven't been able to reproduce the bug on my local windows official
build but I suspect that after using async wheel targeting for wheel
events some of the wheel events in RunTest get coalesced to each other
before getting dispatched.

Bug: 800822
Change-Id: Id693ef3beff19daf08c3e11c2119b2bf90ef6737
Reviewed-on: https://chromium-review.googlesource.com/893803Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533002}
parent fc8832a5
...@@ -1600,6 +1600,7 @@ class SitePerProcessMouseWheelHitTestBrowserTest ...@@ -1600,6 +1600,7 @@ class SitePerProcessMouseWheelHitTestBrowserTest
InputEventAckWaiter waiter(expected_target->GetRenderWidgetHost(), InputEventAckWaiter waiter(expected_target->GetRenderWidgetHost(),
blink::WebInputEvent::kMouseWheel); blink::WebInputEvent::kMouseWheel);
waiter.Reset();
SendMouseWheel(pos); SendMouseWheel(pos);
waiter.Wait(); waiter.Wait();
...@@ -1609,7 +1610,9 @@ class SitePerProcessMouseWheelHitTestBrowserTest ...@@ -1609,7 +1610,9 @@ class SitePerProcessMouseWheelHitTestBrowserTest
EXPECT_TRUE(msg_queue.WaitForMessage(&reply)); EXPECT_TRUE(msg_queue.WaitForMessage(&reply));
EXPECT_EQ("\"scroll: 1\"", reply); EXPECT_EQ("\"scroll: 1\"", reply);
waiter.Reset();
SendMouseWheel(pos); SendMouseWheel(pos);
waiter.Wait();
// If async_wheel_events is disabled, this time only the wheel handler // If async_wheel_events is disabled, this time only the wheel handler
// fires, since even numbered scrolls are prevent-defaulted. If it is // fires, since even numbered scrolls are prevent-defaulted. If it is
...@@ -1624,7 +1627,9 @@ class SitePerProcessMouseWheelHitTestBrowserTest ...@@ -1624,7 +1627,9 @@ class SitePerProcessMouseWheelHitTestBrowserTest
EXPECT_EQ("\"scroll: 2\"", reply); EXPECT_EQ("\"scroll: 2\"", reply);
} }
waiter.Reset();
SendMouseWheel(pos); SendMouseWheel(pos);
waiter.Wait();
// Odd number of wheels, expect both wheel and scroll handlers to fire // Odd number of wheels, expect both wheel and scroll handlers to fire
// again. // again.
......
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