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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 2581153003: Reland of Delay Input.dispatchKeyEvent response until after key event ack. (Closed)
Patch Set: rebase and resolve merge conflicts Created 4 years 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
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index fac5648880c519b993b51a6d58b811a896783b1c..99839d5565f52566dd14ce091f2147d47b731733 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -1530,9 +1530,13 @@ bool InputMsgWatcher::OnMessageReceived(const IPC::Message& message) {
return false;
}
+bool InputMsgWatcher::HasReceivedAck() const {
+ return ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN;
+}
+
uint32_t InputMsgWatcher::WaitForAck() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN)
+ if (HasReceivedAck())
return ack_result_;
base::RunLoop run_loop;
base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure());
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698