Changeset 116777 in webkit


Ignore:
Timestamp:
May 11, 2012 9:33:42 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Two of the touch-adjustment tests are flaky.
https://bugs.webkit.org/show_bug.cgi?id=86218

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-05-11
Reviewed by Simon Hausmann.

Move the touch points and text so the tests are more stable.

  • touchadjustment/event-triggered-widgets-expected.txt:
  • touchadjustment/event-triggered-widgets.html:
  • touchadjustment/touch-inlines.html:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116776 r116777  
     12012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
     2
     3        Two of the touch-adjustment tests are flaky.
     4        https://bugs.webkit.org/show_bug.cgi?id=86218
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Move the touch points and text so the tests are more stable.
     9
     10        * touchadjustment/event-triggered-widgets-expected.txt:
     11        * touchadjustment/event-triggered-widgets.html:
     12        * touchadjustment/touch-inlines.html:
     13
    1142012-05-11  Christophe Dumez  <christophe.dumez@intel.com>
    215
  • trunk/LayoutTests/touchadjustment/event-triggered-widgets-expected.txt

    r111185 r116777  
    2828Mouse-over here should give a text input-field.
    2929Hovering here should give a text input-field.
    30 Focusing here should only give focus outline.
     30Focusing here should only give focus outline to this inner text.
    3131Focusing here should give a text input-field.
  • trunk/LayoutTests/touchadjustment/event-triggered-widgets.html

    r111185 r116777  
    22<head>
    33<style>
    4     .box { border: 1px solid black; border-radius: 5px 5px; margin: 1em; max-width: 40em; }
     4    .box { border: 1px solid black; border-radius: 5px 5px; margin: 1em; width: 40em; }
    55</style>
    66
     
    2828    }
    2929
     30    function findBestClickableNode(x, y, width, height)
     31    {
     32        var adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
     33        if (adjustedNode && adjustedNode.nodeType == 3) // TEXT node
     34            adjustedNode = adjustedNode.parentNode;
     35        return adjustedNode;
     36    }
     37
    3038    function testDirectTouch(element)
    3139    {
     
    3543        var width = 3;
    3644        var height = 3;
    37         adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
    38 
    39         if (adjustedNode.nodeType == 3) // TEXT node
    40             adjustedNode = adjustedNode.parentNode;
     45        adjustedNode = findBestClickableNode(x, y, width, height);
    4146    }
    4247
     
    4853        var width = element.clientHeight;
    4954        var height = element.clientHeight + 10;
    50         adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
    51         if (adjustedNode.nodeType == 3) // TEXT node
    52             adjustedNode = adjustedNode.parentNode;
     55        adjustedNode = findBestClickableNode(x, y, width, height);
    5356    }
    5457
     
    6063        var width = 10;
    6164        var height = 10;
    62         adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
    63         if (adjustedNode.nodeType == 3) // TEXT node
    64             adjustedNode = adjustedNode.parentNode;
     65        adjustedNode = findBestClickableNode(x, y, width, height);
    6566    }
    6667
     
    152153
    153154<div id=test4 class=box onfocus='triggerInput()'>
    154     <span tabindex=1> Focusing here should only give focus outline.
     155    <span tabindex=1> Focusing here should only give focus outline to this inner text.
    155156    </span>
    156157</div>
  • trunk/LayoutTests/touchadjustment/touch-inlines.html

    r113193 r116777  
    5454
    5555        adjustedNode = testRoundTouch(56, 60, 8)
    56         shouldEvaluateTo('adjustedNode', 'null');
     56        shouldBeNull('adjustedNode');
    5757
    58         adjustedNode = testRoundTouch(20, 160, 4)
    59         shouldEvaluateTo('adjustedNode', 'null');
     58        adjustedNode = testRoundTouch(20, 166, 4)
     59        shouldBeNull('adjustedNode');
    6060
    6161    }
     
    7171        shouldBeEqualToString('adjustedNode.id', '3');
    7272
    73         adjustedNode = testRoundTouch(120, 60, 20)
     73        adjustedNode = testRoundTouch(120, 66, 30)
    7474        shouldBeEqualToString('adjustedNode.id', '4');
    7575
     
    7777        shouldBeEqualToString('adjustedNode.id', '4');
    7878
    79         adjustedNode = testRoundTouch(20, 165, 20)
     79        adjustedNode = testRoundTouch(20, 174, 30)
    8080        shouldBeEqualToString('adjustedNode.id', '6');
    8181
Note: See TracChangeset for help on using the changeset viewer.