Skip to content

Commit

Permalink
Add timeouts to tests for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
keanulee committed Aug 9, 2018
1 parent 613dca4 commit 6135d34
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions test/focus.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@
done();
};
document.addEventListener('keydown', handler);
MockInteractions.pressAndReleaseKeyOn(list, 38); // up
requestAnimationFrame(function() {
setTimeout(function() {
MockInteractions.pressAndReleaseKeyOn(list, 38); // up
});
});
});
});

Expand All @@ -276,7 +280,11 @@
done();
};
document.addEventListener('keydown', handler);
MockInteractions.pressAndReleaseKeyOn(list, 40); // down
requestAnimationFrame(function() {
setTimeout(function() {
MockInteractions.pressAndReleaseKeyOn(list, 40); // down
});
});
});
});

Expand All @@ -290,7 +298,11 @@
done();
};
document.addEventListener('keydown', handler);
MockInteractions.pressAndReleaseKeyOn(list, 38); // up
requestAnimationFrame(function() {
setTimeout(function() {
MockInteractions.pressAndReleaseKeyOn(list, 38); // up
});
});
});
});

Expand All @@ -304,7 +316,11 @@
done();
};
document.addEventListener('keydown', handler);
MockInteractions.pressAndReleaseKeyOn(list, 40); // down
requestAnimationFrame(function() {
setTimeout(function() {
MockInteractions.pressAndReleaseKeyOn(list, 40); // down
});
});
});
});

Expand Down

0 comments on commit 6135d34

Please sign in to comment.