blob: f670c577659019ab1043efc4b349a27e3b62f0d4 [file] [edit]
# 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:
# FlingStop
# Scroll d=254.5 x=64 y=195 r=5.664 s=165.2
# Scroll d=14 x=14 y=0 r=0.7175 s=336.9
# Fling d=0 x=0 y=0 r=0 s=0
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ScrollValidator("= 162.5 ~ 25.0", merge=True),
FlingValidator()
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)