blob: 6162da2b7228440c9a952c2e9aff79fbc82d72f9 [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
# Scroll d=364 x=0 y=364 r=16.41 s=564.3
# Motion d=92.98 x=68.67 y=57.1 r=1.175 s=149.3
# FlingStop
# Fling d=0 x=0 y=0 r=0 s=0
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ScrollValidator(">= 100"),
MotionValidator("== 92 ~ 50"),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)