mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1252256, part 12 - Don't call continueTest if we're not expecting any more async handler calls. r=masayuki
This makes the sync dispatchEvent() call work properly, and also makes the case where there are too many async events work better
This commit is contained in:
parent
9f98e659dd
commit
fb9a47d272
@ -226,7 +226,7 @@ function* testDeltaMultiplierPrefs()
|
||||
is(aEvent.deltaY, expectedDeltaY, description + "deltaY (" + currentEvent.deltaY + ") was invalid");
|
||||
is(aEvent.deltaZ, expectedDeltaZ, description + "deltaZ (" + currentEvent.deltaZ + ") was invalid");
|
||||
|
||||
if (--expectedAsyncHandlerCalls == 0) {
|
||||
if (expectedAsyncHandlerCalls > 0 && --expectedAsyncHandlerCalls == 0) {
|
||||
setTimeout(continueTest, 0);
|
||||
}
|
||||
}
|
||||
@ -288,7 +288,7 @@ function* testDeltaMultiplierPrefs()
|
||||
|
||||
aEvent.preventDefault();
|
||||
|
||||
if (--expectedAsyncHandlerCalls == 0) {
|
||||
if (expectedAsyncHandlerCalls > 0 && --expectedAsyncHandlerCalls == 0) {
|
||||
setTimeout(continueTest, 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user