blob: b2dbbc800b5dd891a0a6a08125dea5c8ad76cb27 [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 __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from fuzzy_check import FuzzyCheck
from validators import *
# originally generated gestures:
# Scroll d=1316 x=0 y=1316 r=14.53
# Fling d=1075 x=0 y=1075 r=2.274e-13
# FlingStop
# Motion d=97.48 x=6.485 y=96.95 r=2.603
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ScrollValidator(">10"),
MotionValidator("<100", merge=True),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
FlingValidator(),
]
return fuzzy.Check(gestures)