| Index: LayoutTests/platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
|
| diff --git a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html b/LayoutTests/platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
|
| deleted file mode 100644
|
| index 5ec092e4c5846b4b2e38842fb6ef8db27955462c..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html
|
| +++ /dev/null
|
| @@ -1,123 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| -<script src="../../../../../fast/js/resources/js-test-pre.js"></script>
|
| -<script src="../../../../../fast/forms/resources/common.js"></script>
|
| -<script src="../../../../../fast/forms/resources/common-wheel-event.js"></script>
|
| -<script src="../../../../../fast/forms/resources/picker-common.js"></script>
|
| -<script src="resources/suggestion-picker-common.js"></script>
|
| -</head>
|
| -<body style="background-color: #bbbbbb;">
|
| -<p id="description"></p>
|
| -<div id="console"></div>
|
| -<input type=time id=time value="01:00" list=suggestions>
|
| -<datalist id=suggestions>
|
| - <option label="Now">01:01</option>
|
| - <option>01:02</option>
|
| - <option>01:03</option>
|
| - <option>01:04</option>
|
| - <option>01:05</option>
|
| - <option>01:06</option>
|
| - <option>01:07</option>
|
| - <option>01:08</option>
|
| - <option>01:09</option>
|
| - <option>01:10</option>
|
| - <option>01:11</option>
|
| - <option>01:12</option>
|
| - <option>01:13</option>
|
| - <option>01:14</option>
|
| - <option>01:15</option>
|
| - <option>01:16</option>
|
| - <option>01:17</option>
|
| - <option>01:18</option>
|
| - <option>01:19</option>
|
| - <option>01:20</option>
|
| - <option>01:21</option>
|
| -</datalist>
|
| -<script>
|
| -debug('Check that page popup doesn\'t exist at first.');
|
| -shouldBeNull('$("mock-page-popup")');
|
| -
|
| -window.onload = function() {
|
| - openPicker($('time'), test1);
|
| -};
|
| -
|
| -
|
| -function test1() {
|
| - debug('Check that page popup exists.');
|
| - shouldBe('popupWindow.pagePopupController.toString()', '"[object PagePopupController]"');
|
| -
|
| - debug('Check that page popup exists.');
|
| - shouldBe('popupWindow.pagePopupController.toString()', '"[object PagePopupController]"');
|
| -
|
| - debug('Check that hovering over an entry highlights it.');
|
| - hoverOverElement(popupWindow.document.querySelector(".suggestion-list-entry:nth-child(2)"));
|
| - shouldBe('highlightedEntry()', '"01:02"');
|
| -
|
| - debug('Check that moving the mouse outside the popup de-highlights entries.');
|
| - hoverOverElement(document.getElementById('description'));
|
| - shouldBeNull('highlightedEntry()');
|
| -
|
| - debug('Check that mouse click closes the popup and sets the value.');
|
| - clickElement(popupWindow.document.querySelector(".suggestion-list-entry:nth-child(3)"));
|
| - waitUntilClosing(test1AfterClosing);
|
| -}
|
| -
|
| -function test1AfterClosing() {
|
| - shouldBeNull('document.getElementById("mock-page-popup")');
|
| - shouldBe('document.getElementById("time").value', '"01:03"');
|
| -
|
| - openPicker($('time'), test2);
|
| -}
|
| -
|
| -var scrollTopBeforeWheelEvent = 0;
|
| -var scrollTopAfterWheelEvent = 0;
|
| -
|
| -function test2() {
|
| - var 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('\x1B');
|
| - waitUntilClosing(test2AfterClosing);
|
| -}
|
| -
|
| -function test2AfterClosing() {
|
| - shouldBeNull('$("mock-page-popup")');
|
| -
|
| - openPicker($('time'), test3);
|
| -}
|
| -
|
| -function test3() {
|
| - debug('Check that you can scroll using the scroll bar.');
|
| -
|
| - var suggestionList = popupWindow.document.getElementsByClassName("suggestion-list")[0];
|
| - var suggestionListOffset = cumulativeOffset(suggestionList);
|
| - var scrollbarCenterX = suggestionListOffset[0] + suggestionList.offsetWidth - popupWindow.getScrollbarWidth() / 2;
|
| -
|
| - scrollTopBeforeWheelEvent = suggestionList.scrollTop;
|
| - eventSender.mouseMoveTo(scrollbarCenterX, suggestionListOffset[1] + 20); // 20 is the height of the up arrow button plus a few pixels
|
| - eventSender.mouseDown();
|
| - eventSender.mouseMoveTo(scrollbarCenterX, suggestionListOffset[1] + suggestionList.offsetHeight);
|
| - eventSender.mouseUp();
|
| - scrollTopAfterWheelEvent = suggestionList.scrollTop;
|
| - shouldBeTrue('scrollTopBeforeWheelEvent < scrollTopAfterWheelEvent');
|
| -
|
| - finishJSTest();
|
| -}
|
| -
|
| -</script>
|
| -<script src="../../../../../fast/js/resources/js-test-post.js"></script>
|
| -</body>
|
| -</html>
|
|
|