blob: a670f7ed453ca33e60c2c95c54ea1334d614c4bd [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:
# Scroll d=2423 x=0 y=2423 r=52.46
# Fling d=11621 x=0 y=11621 r=0.00
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ScrollValidator("== 2000.0 ~ 1666.7"),
FlingValidator("> 5833.3 ~ 2916.7"),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)