gecko/accessible/tests/mochitest/jsat/gestures.json
Yura Zenevich 7bf8884628 Bug 976082 - added tests for Touch Adapter. r=eeejay
---
 accessible/tests/mochitest/jsat/a11y.ini           |   3 +
 accessible/tests/mochitest/jsat/dom_helper.js      | 157 +++++++++++++++++
 accessible/tests/mochitest/jsat/gestures.json      | 194 +++++++++++++++++++++
 accessible/tests/mochitest/jsat/jsatcommon.js      |  15 +-
 .../tests/mochitest/jsat/test_touch_adapter.html   |  66 +++++++
 5 files changed, 430 insertions(+), 5 deletions(-)
 create mode 100644 accessible/tests/mochitest/jsat/dom_helper.js
 create mode 100644 accessible/tests/mochitest/jsat/gestures.json
 create mode 100644 accessible/tests/mochitest/jsat/test_touch_adapter.html
2014-03-10 23:33:58 -04:00

195 lines
6.3 KiB
JSON

[
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchend", "delay": 50}
],
"expectedGestures": "tap"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove",
"target": [{"base": "button", "x": 0.03, "y": 0.02}], "delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "tap"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchend", "delay": 525}
],
"expectedGestures": ["dwell", "dwellend"]
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove",
"target": [{"base": "button", "x": 0.03, "y": 0.02}], "delay": 25},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchmove",
"target": [{"base": "button", "x": -0.03, "y": 0.01}], "delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": ["tap", "doubletap"]
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": ["tap", "doubletap", "tripletap"]
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 525}
],
"expectedGestures": ["tap", "doubletap", "doubletaphold", "dwellend"]
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchend", "delay": 25},
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 525}
],
"expectedGestures": ["tap", "taphold", "dwellend"]
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0.5, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swiperight"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0.5, "y": 0}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipeleft"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0.5}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipedown"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0.5}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipeup"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0.5, "y": 0.1}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swiperight"
},
{
"events": [
{"type": "touchstart",
"target": [{"base": "button", "x": 0.5, "y": 0.1}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": -0.05}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipeleft"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0}]},
{"type": "touchmove",
"target": [{"base": "button", "x": -0.1, "y": 0.5}], "delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipedown"
},
{
"events": [
{"type": "touchstart",
"target": [{"base": "button", "x": 0.1, "y": 0.5}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swipeup"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0},
{"base": "button", "x": 0, "y": 0.5}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0.5, "y": 0},
{"base": "button", "x": 0.5, "y": 0.5}], "delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swiperight"
},
{
"events": [
{"type": "touchstart", "target": [{"base": "button", "x": 0, "y": 0},
{"base": "button", "x": 0, "y": 0.5},
{"base": "button", "x": 0, "y": 1}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0.5, "y": 0},
{"base": "button", "x": 0.5, "y": 0.5},
{"base": "button", "x": 0.5, "y": 1}],
"delay": 25},
{"type": "touchend", "delay": 25}
],
"expectedGestures": "swiperight"
},
{
"events": [
{"type": "touchstart",
"target": [{"base": "button", "x": 0.6, "y": 0.5}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 525},
{"type": "touchend", "delay": 25}
],
"expectedGestures": ["dwell", "explore", "exploreend"]
},
{
"events": [
{"type": "touchstart",
"target": [{"base": "button", "x": 0, "y": 0.5}]},
{"type": "touchmove", "target": [{"base": "button", "x": 0, "y": 0}],
"delay": 525},
{"type": "touchmove", "target": [{"base": "button", "x": 0.5, "y": 0}],
"delay": 125},
{"type": "touchend", "delay": 25}
],
"expectedGestures": ["dwell", "explore", "explore", "exploreend"]
}
]