Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html
diff --git a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html b/LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html
deleted file mode 100644
index 9e7fd2de0da0facdd55c1a23a619a05965ae430b..0000000000000000000000000000000000000000
--- a/LayoutTests/platform/chromium/fast/forms/suggestion-picker/date-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=date id=date value="2012-12-24" list=suggestions>
-<datalist id=suggestions>
- <option label="Today">2012-01-01</option>
- <option label="Tomorrow">2012-01-02</option>
- <option>2012-01-03</option>
- <option>2012-01-04</option>
- <option>2012-01-05</option>
- <option>2012-01-06</option>
- <option>2012-01-07</option>
- <option>2012-01-08</option>
- <option>2012-01-09</option>
- <option>2012-01-10</option>
- <option>2012-01-11</option>
- <option>2012-01-12</option>
- <option>2012-01-13</option>
- <option>2012-01-14</option>
- <option>2012-01-15</option>
- <option>2012-01-16</option>
- <option>2012-01-17</option>
- <option>2012-01-18</option>
- <option>2012-01-19</option>
- <option>2012-01-20</option>
- <option label="-">2012-01-21</option>
- <option>2012-01-22</option>
- <option>2012-01-23</option>
- <option>2012-01-24</option>
- <option>2012-01-25</option>
- <option>2012-01-26</option>
- <option>2012-01-27</option>
- <option>2012-01-28</option>
- <option>2012-01-29</option>
- <option>2012-01-30</option>
- <option>2012-01-31</option>
- <option>2012-02-01</option>
- <option>2012-02-02</option>
- <option>2012-02-03</option>
- <option>2012-02-04</option>
- <option>2012-02-05</option>
- <option>2012-02-06</option>
- <option>2012-02-07</option>
- <option>2012-02-08</option>
- <option>2012-02-09</option>
- <option label="-">2012-02-10</option>
- <option>2012-02-11</option>
- <option>2012-02-12</option>
- <option>2012-02-13</option>
- <option>2012-02-14</option>
- <option>2012-02-15</option>
- <option>2012-02-16</option>
- <option>2012-02-17</option>
- <option>2012-02-18</option>
- <option>2012-02-19</option>
- <option>2012-02-20</option>
- <option>2012-02-21</option>
- <option>2012-02-22</option>
- <option>2012-02-23</option>
- <option>2012-02-24</option>
- <option>2012-02-25</option>
- <option>2012-02-26</option>
- <option>2012-02-27</option>
- <option>2012-02-28</option>
- <option>2012-02-29</option>
- <option>2012-03-01</option>
- <option>2012-03-02</option>
- <option>2012-03-03</option>
- <option>2012-03-04</option>
- <option>2012-03-05</option>
- <option>2012-03-06</option>
- <option>2012-03-07</option>
- <option>2012-03-08</option>
- <option>2012-01-00</option> <!--invalid-->
- <option>foo</option> <!--invalid-->
-</datalist>
-<script>
-debug('Check that page popup doesn\'t exist at first.');
-shouldBeNull('$("mock-page-popup")');
-
-openPicker($('date'), test1);
-
-function test1() {
- 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()', '"2012-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('$("mock-page-popup")');
- shouldBe('document.getElementById("date").value', '"2012-01-03"');
-
- openPicker($('date'), 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($('date'), 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>

Powered by Google App Engine
This is Rietveld 408576698