Bug 98034 - Add more tests for calendar picker
Summary: Add more tests for calendar picker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keishi Hattori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 08:13 PDT by Keishi Hattori
Modified: 2012-10-01 18:55 PDT (History)
2 users (show)

See Also:


Attachments
Patch (17.70 KB, patch)
2012-10-01 08:50 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff
Patch (20.23 KB, patch)
2012-10-01 18:34 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keishi Hattori 2012-10-01 08:13:50 PDT
We need to add more tests for calendar picker
Comment 1 Keishi Hattori 2012-10-01 08:50:07 PDT
Created attachment 166485 [details]
Patch
Comment 2 Kent Tamura 2012-10-01 17:26:31 PDT
Comment on attachment 166485 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=166485&action=review

ok.

> LayoutTests/fast/forms/date/calendar-picker-mouse-operations.html:79
> +function cumulativeOffset(element) {
> +    var x = 0;
> +    var y = 0;
> +    var parentFrame = element.ownerDocument.defaultView.frameElement;
> +    if (parentFrame) {
> +        var parentFrameOffset = cumulativeOffset(parentFrame);
> +        x = parentFrameOffset[0];
> +        y = parentFrameOffset[1];
> +    }
> +    if (element.parentNode) {
> +        do {
> +            x += element.offsetLeft || 0;
> +            y += element.offsetTop  || 0;
> +            element = element.offsetParent;
> +        } while (element);
> +    }
> +    return [x, y];
> +}
> +
> +function hoverOverElement(element) {
> +    var offset = cumulativeOffset(element);
> +    var centerX = offset[0] + element.offsetWidth / 2;
> +    var centerY = offset[1] + element.offsetHeight / 2;
> +    eventSender.mouseMoveTo(centerX, centerY);
> +}
> +
> +function clickElement(element) {

I remember another test has these functions. Don't you share them?
Comment 3 Keishi Hattori 2012-10-01 18:34:15 PDT
Created attachment 166589 [details]
Patch
Comment 4 Keishi Hattori 2012-10-01 18:37:21 PDT
(In reply to comment #2)
> I remember another test has these functions. Don't you share them?

Added these three functions for fast/forms/resources/common.js and used it in date-suggestion-picker-mouse-operations.html
Comment 5 WebKit Review Bot 2012-10-01 18:55:16 PDT
Comment on attachment 166589 [details]
Patch

Clearing flags on attachment: 166589

Committed r130111: <http://trac.webkit.org/changeset/130111>
Comment 6 WebKit Review Bot 2012-10-01 18:55:19 PDT
All reviewed patches have been landed.  Closing bug.