blob: 3481032713d268f612178abb2971c4f138e58e13 [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:
# FlingStop
# Scroll d=129 x=0 y=129 r=0.4094
# Fling d=0 x=0 y=0 r=0
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ButtonDownValidator(1),
MotionValidator(),
ButtonUpValidator(1),
# Make sure we get some scroll
ScrollValidator(">= 100"),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
FlingValidator(),
]
return fuzzy.Check(gestures)