| Index: LayoutTests/fast/events/touch/resources/touch-hover-active-tests.js
|
| diff --git a/LayoutTests/fast/events/touch/resources/touch-hover-active-tests.js b/LayoutTests/fast/events/touch/resources/touch-hover-active-tests.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..324adc75012fc2187b12170bf9b1d0101ce95e54
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/touch/resources/touch-hover-active-tests.js
|
| @@ -0,0 +1,28 @@
|
| +function getHoverActiveState(e)
|
| +{
|
| + var states = {
|
| + "rgb(0, 0, 255)": "default",
|
| + "rgb(0, 255, 0)": "active",
|
| + "rgb(255, 0, 0)": "hovered",
|
| + "rgb(255, 255, 0)": "hoveredAndActive"
|
| + };
|
| +
|
| + var color = window.getComputedStyle(e).backgroundColor;
|
| + var result = states[color];
|
| + if (!result)
|
| + result = "unknown: " + color;
|
| + return result;
|
| +}
|
| +
|
| +function elementCenter(e)
|
| +{
|
| + return {
|
| + x: e.offsetLeft + e.offsetWidth / 2,
|
| + y: e.offsetTop + e.offsetHeight / 2
|
| + }
|
| +}
|
| +
|
| +function shouldBeDefault(e) { shouldBeEqualToString(e, "default"); }
|
| +function shouldBeOnlyActive(e) { shouldBeEqualToString(e, "active"); }
|
| +function shouldBeOnlyHovered(e) { shouldBeEqualToString(e, "hovered"); }
|
| +function shouldBeHoveredAndActive(e) { shouldBeEqualToString(e, "hoveredAndActive"); }
|
|
|