blob: 9be33af71d800c74d5ebad27b4e00eb46f00810a [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
# 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)