blob: 99e5cc6ec63dca0a4abf2040dd1eb0e136721d35 [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=2746 x=9 y=2737 r=41.96
# Fling d=24440 x=0 y=24440 r=0.00
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
ScrollValidator("== 2288.3 ~ 1666.7"),
FlingValidator("== 20366.7 ~ 8333.3"),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)