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

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 2387353004: Delay Input.dispatchKeyEvent response until after key event ack. (Closed)
Patch Set: add test, address review comments about docs Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 532
533 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver); 533 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver);
534 }; 534 };
535 535
536 // Watches for an input msg to be consumed. 536 // Watches for an input msg to be consumed.
537 class InputMsgWatcher : public BrowserMessageFilter { 537 class InputMsgWatcher : public BrowserMessageFilter {
538 public: 538 public:
539 InputMsgWatcher(RenderWidgetHost* render_widget_host, 539 InputMsgWatcher(RenderWidgetHost* render_widget_host,
540 blink::WebInputEvent::Type type); 540 blink::WebInputEvent::Type type);
541 541
542 bool HasReceivedAck();
543
542 // Wait until ack message occurs, returning the ack result from 544 // Wait until ack message occurs, returning the ack result from
543 // the message. 545 // the message.
544 uint32_t WaitForAck(); 546 uint32_t WaitForAck();
545 547
546 private: 548 private:
547 ~InputMsgWatcher() override; 549 ~InputMsgWatcher() override;
548 550
549 // Overridden BrowserMessageFilter methods. 551 // Overridden BrowserMessageFilter methods.
550 bool OnMessageReceived(const IPC::Message& message) override; 552 bool OnMessageReceived(const IPC::Message& message) override;
551 553
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 698
697 // The MessageLoopRunner used to spin the message loop. 699 // The MessageLoopRunner used to spin the message loop.
698 scoped_refptr<MessageLoopRunner> message_loop_runner_; 700 scoped_refptr<MessageLoopRunner> message_loop_runner_;
699 701
700 DISALLOW_COPY_AND_ASSIGN(ConsoleObserverDelegate); 702 DISALLOW_COPY_AND_ASSIGN(ConsoleObserverDelegate);
701 }; 703 };
702 704
703 } // namespace content 705 } // namespace content
704 706
705 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 707 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698