Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1160)

Unified Diff: content/test/data/devtools/input_ack_tests.html

Issue 2387353004: Delay Input.dispatchKeyEvent response until after key event ack. (Closed)
Patch Set: fix nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/data/devtools/input_ack_tests.html
diff --git a/content/test/data/devtools/input_ack_tests.html b/content/test/data/devtools/input_ack_tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..98461aad8085d9a3e46d24621a9545a5da664bfd
--- /dev/null
+++ b/content/test/data/devtools/input_ack_tests.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div id="target">click target</div>
+ <script>
+ var handle = function(e) {
+ domAutomationController.setAutomationId(0);
+ domAutomationController.send(e.constructor.name + ' listener');
+ var start = Date.now();
+ var end = start + 5000;
+ while (Date.now() < end) {
+ // spin for 5 seconds to block the key event ack
dgozman 2016/11/21 19:14:39 This will be flaky for sure :) Do we really need i
samuong 2016/11/21 22:28:43 What's the best way to verify that we don't get th
samuong 2016/11/23 00:37:47 Since I already had the browser test set up, I've
+ }
+ }
+ document.body.addEventListener('keydown', handle);
+ document.getElementById('target').addEventListener('mousemove', handle);
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698