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

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: remove |is_synthetic|, fixed bug for mouse acks, add test for mouse events 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 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver); 545 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver);
546 }; 546 };
547 547
548 // Watches for an input msg to be consumed. 548 // Watches for an input msg to be consumed.
549 class InputMsgWatcher : public BrowserMessageFilter { 549 class InputMsgWatcher : public BrowserMessageFilter {
550 public: 550 public:
551 InputMsgWatcher(RenderWidgetHost* render_widget_host, 551 InputMsgWatcher(RenderWidgetHost* render_widget_host,
552 blink::WebInputEvent::Type type); 552 blink::WebInputEvent::Type type);
553 553
554 bool HasReceivedAck();
dtapuska 2016/11/21 14:49:45 should be const
samuong 2016/11/21 18:05:34 Done.
555
554 // Wait until ack message occurs, returning the ack result from 556 // Wait until ack message occurs, returning the ack result from
555 // the message. 557 // the message.
556 uint32_t WaitForAck(); 558 uint32_t WaitForAck();
557 559
558 uint32_t last_event_ack_source() const { return ack_source_; } 560 uint32_t last_event_ack_source() const { return ack_source_; }
559 561
560 private: 562 private:
561 ~InputMsgWatcher() override; 563 ~InputMsgWatcher() override;
562 564
563 // Overridden BrowserMessageFilter methods. 565 // Overridden BrowserMessageFilter methods.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 715
714 // The MessageLoopRunner used to spin the message loop. 716 // The MessageLoopRunner used to spin the message loop.
715 scoped_refptr<MessageLoopRunner> message_loop_runner_; 717 scoped_refptr<MessageLoopRunner> message_loop_runner_;
716 718
717 DISALLOW_COPY_AND_ASSIGN(ConsoleObserverDelegate); 719 DISALLOW_COPY_AND_ASSIGN(ConsoleObserverDelegate);
718 }; 720 };
719 721
720 } // namespace content 722 } // namespace content
721 723
722 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 724 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698