diff --git a/test/focus.html b/test/focus.html
index 3fb0347c..79a13ace 100644
--- a/test/focus.html
+++ b/test/focus.html
@@ -262,7 +262,11 @@
done();
};
document.addEventListener('keydown', handler);
- MockInteractions.pressAndReleaseKeyOn(list, 38); // up
+ requestAnimationFrame(function() {
+ setTimeout(function() {
+ MockInteractions.pressAndReleaseKeyOn(list, 38); // up
+ });
+ });
});
});
@@ -276,7 +280,11 @@
done();
};
document.addEventListener('keydown', handler);
- MockInteractions.pressAndReleaseKeyOn(list, 40); // down
+ requestAnimationFrame(function() {
+ setTimeout(function() {
+ MockInteractions.pressAndReleaseKeyOn(list, 40); // down
+ });
+ });
});
});
@@ -290,7 +298,11 @@
done();
};
document.addEventListener('keydown', handler);
- MockInteractions.pressAndReleaseKeyOn(list, 38); // up
+ requestAnimationFrame(function() {
+ setTimeout(function() {
+ MockInteractions.pressAndReleaseKeyOn(list, 38); // up
+ });
+ });
});
});
@@ -304,7 +316,11 @@
done();
};
document.addEventListener('keydown', handler);
- MockInteractions.pressAndReleaseKeyOn(list, 40); // down
+ requestAnimationFrame(function() {
+ setTimeout(function() {
+ MockInteractions.pressAndReleaseKeyOn(list, 40); // down
+ });
+ });
});
});