blob: c5193fbc4737cd0874cf3d79167718e044a97835 [file] [log] [blame]
# 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 fuzzy_check import FuzzyCheck
from validators import *
# originally generated gestures:
# FlingStop
# Motion d=679 x=663 y=51 r=1.91
# FlingStop
# ButtonDown(1)
# ButtonUp(1)
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
MotionValidator("== 679 ~ 679", merge=True),
ButtonDownValidator(1),
ButtonUpValidator(1),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)