),
        eventMap = { start: 'down', move: 'move', end: 'up'}

      event.initEvent('pointer'+eventMap[type], true, true)
      event.pageX = x
      event.pageY = y
      event.pointerType = 'touch'
      event.isPrimary = true

      element.dispatchEvent(event)
    }

    function down(element, x, y) {
      emitEvent('start', element, x, y)
    }
    function move(element, x,y) {
      emitEvent('move', element, x, y)
    }
    function up(element) {
      emitEvent('end', element)
    }

    tests =