blob: 8389e0b1a7a1d97e11373afa3e73dc81bd7cd4d6 [file] [log] [blame]
# Copyright (c) 2013 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=3.508 x=0.8648 y=3.304 r=0.1766
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
MotionValidator("== 0 ~ 10", merge=True),
# FlingStopValidator(),
# ButtonDownValidator(1),
# ButtonUpValidator(1),
# ScrollValidator(">= 100"),
# FlingValidator(">= 100"),
# AnythingButValidator(ButtonDownValidator(1)),
]
fuzzy.unexpected = [
# MotionValidator("<10"),
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)