| Index: third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
|
| index d84c7083c8aae8581e35ec3c295dd945c80e8bef..e7b5c464c9195adccdb49565183289333a2fbc24 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html
|
| @@ -96,25 +96,32 @@ function test1AfterClosing() {
|
|
|
| var scrollTopBeforeWheelEvent = 0;
|
| var scrollTopAfterWheelEvent = 0;
|
| +var suggestionList;
|
|
|
| function test2() {
|
| - var suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
|
| + suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
|
|
|
| debug('Check that you can scroll using the mouse wheel.');
|
|
|
| - scrollTopBeforeWheelEvent = suggestionList.scrollTop;
|
| - dispatchWheelEvent(suggestionList, 0, -100);
|
| - scrollTopAfterWheelEvent = suggestionList.scrollTop;
|
| - shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
|
| -
|
| - scrollTopBeforeWheelEvent = suggestionList.scrollTop;
|
| - dispatchWheelEvent(suggestionList, 0, 100);
|
| - scrollTopAfterWheelEvent = suggestionList.scrollTop;
|
| - shouldBeTrue('scrollTopBeforeWheelEvent > scrollTopAfterWheelEvent');
|
| -
|
| - popupWindow.focus();
|
| - eventSender.keyDown('escape');
|
| - waitUntilClosing(test2AfterClosing);
|
| + function finishTest() {
|
| + popupWindow.focus();
|
| + eventSender.keyDown('escape');
|
| + waitUntilClosing(test2AfterClosing);
|
| + }
|
| +
|
| + function scrollUp() {
|
| + scrollTopBeforeWheelEvent = suggestionList.scrollTop;
|
| + dispatchWheelEvent(suggestionList, 0, 100);
|
| + shouldBecomeEqual('scrollTopBeforeWheelEvent > suggestionList.scrollTop', 'true', finishTest)
|
| + }
|
| +
|
| + function scrollDown() {
|
| + scrollTopBeforeWheelEvent = suggestionList.scrollTop;
|
| + dispatchWheelEvent(suggestionList, 0, -100);
|
| + shouldBecomeEqual('scrollTopBeforeWheelEvent < suggestionList.scrollTop', 'true', scrollUp);
|
| + }
|
| +
|
| + scrollDown();
|
| }
|
|
|
| function test2AfterClosing() {
|
|
|