blob: da3e3e19791555a2ae93a06123f34aa4a751c89d [file] [edit]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from fuzzy_check import FuzzyCheck
from validators import *
# originally generated gestures:
# ButtonDown(1)
# FlingStop
# FlingStop
# Motion d=716 x=100 y=703 r=0.25
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ButtonDownValidator(1),
MotionValidator(end=">19", merge=True),
]
fuzzy.unexpected = [
MotionValidator("<10"),
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)