this fixes work of the checkDirection function in Firefox

Firefox in contrast to IE has "event" as local variable. So we have to pass "event" as parameter for checkDirection function to make this tests work properly on Firefox. The changes affect tests related to specs 15.5, 15.6, 15.8, 15.9, 15.13