Diff
Modified: trunk/LayoutTests/ChangeLog (116776 => 116777)
--- trunk/LayoutTests/ChangeLog 2012-05-11 16:28:52 UTC (rev 116776)
+++ trunk/LayoutTests/ChangeLog 2012-05-11 16:33:42 UTC (rev 116777)
@@ -1,3 +1,16 @@
+2012-05-11 Allan Sandfeld Jensen <[email protected]>
+
+ Two of the touch-adjustment tests are flaky.
+ https://bugs.webkit.org/show_bug.cgi?id=86218
+
+ 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:
+
2012-05-11 Christophe Dumez <[email protected]>
[EFL][DRT] SVG Batik test fails to display Chinese characters
Modified: trunk/LayoutTests/touchadjustment/event-triggered-widgets-expected.txt (116776 => 116777)
--- trunk/LayoutTests/touchadjustment/event-triggered-widgets-expected.txt 2012-05-11 16:28:52 UTC (rev 116776)
+++ trunk/LayoutTests/touchadjustment/event-triggered-widgets-expected.txt 2012-05-11 16:33:42 UTC (rev 116777)
@@ -27,5 +27,5 @@
Focus here should give a text input-field.
Mouse-over here should give a text input-field.
Hovering here should give a text input-field.
-Focusing here should only give focus outline.
+Focusing here should only give focus outline to this inner text.
Focusing here should give a text input-field.
Modified: trunk/LayoutTests/touchadjustment/event-triggered-widgets.html (116776 => 116777)
--- trunk/LayoutTests/touchadjustment/event-triggered-widgets.html 2012-05-11 16:28:52 UTC (rev 116776)
+++ trunk/LayoutTests/touchadjustment/event-triggered-widgets.html 2012-05-11 16:33:42 UTC (rev 116777)
@@ -1,7 +1,7 @@
<html>
<head>
<style>
- .box { border: 1px solid black; border-radius: 5px 5px; margin: 1em; max-width: 40em; }
+ .box { border: 1px solid black; border-radius: 5px 5px; margin: 1em; width: 40em; }
</style>
<script src=""
@@ -27,6 +27,14 @@
return pos;
}
+ function findBestClickableNode(x, y, width, height)
+ {
+ var adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
+ if (adjustedNode && adjustedNode.nodeType == 3) // TEXT node
+ adjustedNode = adjustedNode.parentNode;
+ return adjustedNode;
+ }
+
function testDirectTouch(element)
{
var pos = findAbsolutePosition(element);
@@ -34,10 +42,7 @@
var y = pos.top + element.clientHeight / 2 - 1;
var width = 3;
var height = 3;
- adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
-
- if (adjustedNode.nodeType == 3) // TEXT node
- adjustedNode = adjustedNode.parentNode;
+ adjustedNode = findBestClickableNode(x, y, width, height);
}
function testDirectFatFinger(element)
@@ -47,9 +52,7 @@
var y = pos.top - 5 ;
var width = element.clientHeight;
var height = element.clientHeight + 10;
- adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
- if (adjustedNode.nodeType == 3) // TEXT node
- adjustedNode = adjustedNode.parentNode;
+ adjustedNode = findBestClickableNode(x, y, width, height);
}
function testIndirectFatFinger(element)
@@ -59,9 +62,7 @@
var y = pos.top - 7;
var width = 10;
var height = 10;
- adjustedNode = internals.touchNodeAdjustedToBestClickableNode(x, y, width, height, document);
- if (adjustedNode.nodeType == 3) // TEXT node
- adjustedNode = adjustedNode.parentNode;
+ adjustedNode = findBestClickableNode(x, y, width, height);
}
function testTouchHit(elementid, touchType) {
@@ -151,7 +152,7 @@
</div>
<div id=test4 class=box _onfocus_='triggerInput()'>
- <span tabindex=1> Focusing here should only give focus outline.
+ <span tabindex=1> Focusing here should only give focus outline to this inner text.
</span>
</div>
Modified: trunk/LayoutTests/touchadjustment/touch-inlines.html (116776 => 116777)
--- trunk/LayoutTests/touchadjustment/touch-inlines.html 2012-05-11 16:28:52 UTC (rev 116776)
+++ trunk/LayoutTests/touchadjustment/touch-inlines.html 2012-05-11 16:33:42 UTC (rev 116777)
@@ -53,10 +53,10 @@
debug('Test a few direct misses.');
adjustedNode = testRoundTouch(56, 60, 8)
- shouldEvaluateTo('adjustedNode', 'null');
+ shouldBeNull('adjustedNode');
- adjustedNode = testRoundTouch(20, 160, 4)
- shouldEvaluateTo('adjustedNode', 'null');
+ adjustedNode = testRoundTouch(20, 166, 4)
+ shouldBeNull('adjustedNode');
}
@@ -70,13 +70,13 @@
adjustedNode = testRoundTouch(85, 80, 20)
shouldBeEqualToString('adjustedNode.id', '3');
- adjustedNode = testRoundTouch(120, 60, 20)
+ adjustedNode = testRoundTouch(120, 66, 30)
shouldBeEqualToString('adjustedNode.id', '4');
adjustedNode = testRoundTouch(40, 100, 20)
shouldBeEqualToString('adjustedNode.id', '4');
- adjustedNode = testRoundTouch(20, 165, 20)
+ adjustedNode = testRoundTouch(20, 174, 30)
shouldBeEqualToString('adjustedNode.id', '6');
}