| Index: LayoutTests/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
|
| diff --git a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html b/LayoutTests/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
|
| deleted file mode 100644
|
| index c955a435ababd6faf53cb2dd0bd4abae695b32dc..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html
|
| +++ /dev/null
|
| @@ -1,166 +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=week id=week value="2012-12-24" list=suggestions>
|
| -<datalist id=suggestions>
|
| - <option label="This Week">2012-W01</option>
|
| - <option>2012-W02</option>
|
| - <option>2012-W03</option>
|
| - <option>2012-W04</option>
|
| - <option>2012-W05</option>
|
| - <option>2012-W06</option>
|
| - <option>2012-W07</option>
|
| - <option>2012-W08</option>
|
| - <option>2012-W09</option>
|
| - <option>2012-W10</option>
|
| - <option>2012-W11</option>
|
| - <option>2012-W12</option>
|
| - <option>2012-W13</option>
|
| - <option>2012-W14</option>
|
| - <option>2012-W15</option>
|
| - <option>2012-W16</option>
|
| - <option>2012-W17</option>
|
| - <option>2012-W18</option>
|
| - <option>2012-W19</option>
|
| - <option>2012-W20</option>
|
| - <option>2012-W21</option>
|
| - <option>2012-W22</option>
|
| - <option>2012-W23</option>
|
| - <option>2012-W24</option>
|
| - <option>2012-W25</option>
|
| - <option>2012-W26</option>
|
| - <option>2012-W27</option>
|
| - <option>2012-W28</option>
|
| - <option>2012-W29</option>
|
| - <option>2012-W30</option>
|
| - <option>2012-W31</option>
|
| - <option>2012-W32</option>
|
| - <option>2012-W33</option>
|
| - <option>2012-W34</option>
|
| - <option>2012-W35</option>
|
| - <option>2012-W36</option>
|
| - <option>2012-W37</option>
|
| - <option>2012-W38</option>
|
| - <option>2012-W39</option>
|
| - <option>2012-W40</option>
|
| - <option>2012-W41</option>
|
| - <option>2012-W42</option>
|
| - <option>2012-W43</option>
|
| - <option>2012-W44</option>
|
| - <option>2012-W45</option>
|
| - <option>2012-W46</option>
|
| - <option>2012-W47</option>
|
| - <option>2012-W48</option>
|
| - <option>2012-W49</option>
|
| - <option>2012-W50</option>
|
| - <option>2012-W51</option>
|
| - <option>2012-W52</option>
|
| - <option>2013-W01</option>
|
| - <option>2013-W02</option>
|
| - <option>2013-W03</option>
|
| - <option>2013-W04</option>
|
| - <option>2013-W05</option>
|
| - <option>2013-W06</option>
|
| - <option>2013-W07</option>
|
| - <option>2013-W08</option>
|
| - <option>2013-W09</option>
|
| - <option>2013-W10</option>
|
| - <option>2013-W11</option>
|
| - <option>2013-W12</option>
|
| - <option>2013-W13</option>
|
| - <option>2013-W14</option>
|
| - <option>2013-W15</option>
|
| - <option>2012-W00</option> <!--invalid-->
|
| - <option>2012-01-01</option> <!--invalid-->
|
| - <option>foo</option> <!--invalid-->
|
| -</datalist>
|
| -<script>
|
| -debug('Check that page popup doesn\'t exist at first.');
|
| -shouldBeNull('$("mock-page-popup")');
|
| -
|
| -openPicker($('week'), test1);
|
| -
|
| -function test1() {
|
| - debug('Check that page popup exists.');
|
| - shouldBeEqualToString('popupWindow.pagePopupController.toString()', '[object PagePopupController]');
|
| -
|
| - debug('Check that hovering over an entry highlights it.');
|
| - hoverOverElement(popupWindow.document.querySelector('.suggestion-list-entry:nth-child(2)'));
|
| - shouldBeEqualToString('highlightedEntry()', '2012-W02');
|
| -
|
| - 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('$("mock-page-popup")');
|
| - shouldBeEqualToString('document.getElementById("week").value', '2012-W03');
|
| -
|
| - openPicker($('week'), 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($('week'), 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>
|
|
|